def f(x): if x == 1: return 1 else: return 2*f(x-2) + f(x - 1) print(f(int(input())))