Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.math.BigInteger;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int num = scanner.nextInt();
- BigInteger two = BigInteger.TWO;
- for (int i = 1;i<num;++i){ two = two.multiply(BigInteger.TWO); }
- two = two.subtract(BigInteger.ONE);
- System.out.println(two);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement