Пример #1
0
 public static void main(String[] args) {
   Scanner in = new Scanner(System.in);
   while (in.hasNextBigInteger()) {
     BigInteger N = in.nextBigInteger();
     if (N.compareTo(BigInteger.ONE) > 0) {
       BigInteger two = new BigInteger("2");
       N = N.multiply(two).subtract(two);
     }
     System.out.println(N);
   }
 }