// Arup Guha
// 2/11/2017
// Solution to 2016 German Programming Contest Problem I: Common Knowledge.

import java.util.*;

public class i {
	
	public static void main(String[] args) {
		
		// There are 4 possibilities for Bob's side for each digit, and 2 for Alice's.
		// Since there are n digits for each side, Bob has 4^n options, Alice has 2^n options
		// for a total of 4^n x 2^n = 2^3n options. So, just precompute powers of 2.
		long[] pow2 = new long[63];
		pow2[0] = 1;
		for (int i=1; i<pow2.length; i++) pow2[i] = 2*pow2[i-1];
		
		// Process the input case.
		Scanner stdin = new Scanner(System.in);
		int n = stdin.nextInt();
		System.out.println(pow2[3*n]);
	}
}