import sys sys.setrecursionlimit(10**7) def I(): return int(sys.stdin.readline().rstrip()) def MI(): return map(int,sys.stdin.readline().rstrip().split()) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI2(): return list(map(int,sys.stdin.readline().rstrip())) def S(): return sys.stdin.readline().rstrip() def LS(): return list(sys.stdin.readline().rstrip().split()) def LS2(): return list(sys.stdin.readline().rstrip()) K = I() X = [0]*(1<<16) for i in range(1<<16): A = [(i>>j) & 1 for j in range(16)] count = 0 for j in range(4): for k in range(3): if A[4*j+k] != A[4*j+k+1]: count += 1 for j in range(3): for k in range(4): if A[4*j+k] != A[4*(j+1)+k]: count += 1 X[i] = count dp = [[0]*(K+1) for _ in range(1<<16)] dp[0][0] = 1 for i in range(1,1<<16): x = X[i] A = [] for j in range(16): if (i>>j) & 1: A.append(j) for j in range(K+1): d = 0 if j < x: continue for a in A: d += dp[i^(1<