import java.util.Scanner;


public class Y420 {
	Y420() {
		Scanner sc = new Scanner(System.in);
		
		int x = sc.nextInt();
		
		long ansCnt = 0, ansSum = 0;
	
		if (1 <= x && x <= 31) {
			long comb = 1;
			ansCnt = 1;
			for (int i = 0; i < x; i++) {
				ansCnt = ansCnt * (31 - i) / (i + 1);
			}
			for (int i = 0; i < x - 1; i++) {
				comb = comb * (30 - i) / (i + 1);
			}
			
			long power = 1;
			for (int i = 0; i < 31; i++) {
				ansSum += comb * power;
				power *= 2;
			}
		} else if (x == 0) {
			ansCnt = 1;
		}
		
		System.out.println("" + ansCnt + " " + ansSum);
	}
	public static void main(String argv[]) {
		new Y420();
	}
}