import sys

n = int(input())
a,b = 1,2
if n > 2:
    for i in range(n-2):
        a,b = b,2*a+b
    print(b)
else:
    print(n)