from decimal import Decimal N = int(input()) if(N <= 1): print([4,3][N]) else: n,p = 3,4 for i in range(N-1): next = Decimal(19 * n - 12 * p) / Decimal(4) n,p = next,n print(n)