import sys input=lambda: sys.stdin.readline().rstrip() A=[4,3] n=int(input()) for i in range(n-1): A.append((19*A[-1]-12*A[-2])/4) print(A[n])