import java.math.BigDecimal; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int N = scanner.nextInt(); BigDecimal[] A = new BigDecimal[101]; A[0]= new BigDecimal(4); A[1] = new BigDecimal(3); for (int i = 2; i <= N; i++) { BigDecimal a = A[i - 1].multiply(new BigDecimal(19)); BigDecimal b = A[i - 2].multiply(new BigDecimal(12)); A[i] = a.subtract(b).divide(new BigDecimal(4)); } System.out.println(A[N]); } }