N = int(eval(input()))

L = [0]*(N+1)

L[0],L[1]=2,1

for i in range(2,N+1):

  L[i] = L[i-1]+L[i-2]

print((L[N]))
def solve():

    ans = 0

    N = int(eval(input()))

    dp = [0]*(N+1)

    dp[0]=2

    dp[1]=1

    for i in range(2,N+1):

        dp[i] = dp[i-1]+dp[i-2]

    return dp[-1]

print((solve()))
N = int(eval(input()))
L = [0] * (N + 1)
L[0], L[1] = 2, 1
for i in range(2, N + 1):
    L[i] = L[i - 1] + L[i - 2]
print((L[N]))

def solve():
    ans = 0
    N = int(eval(input()))
    dp = [0] * (N + 1)
    dp[0] = 2
    dp[1] = 1
    for i in range(2, N + 1):
        dp[i] = dp[i - 1] + dp[i - 2]
    return dp[-1]


print((solve()))

-N = int(eval(input())) -L = [0] * (N + 1) -L[0], L[1] = 2, 1 -for i in range(2, N + 1): -    L[i] = L[i - 1] + L[i - 2] -print((L[N])) +def solve(): +    ans = 0 +    N = int(eval(input())) +    dp = [0] * (N + 1) +    dp[0] = 2 +    dp[1] = 1 +    for i in range(2, N + 1): +        dp[i] = dp[i - 1] + dp[i - 2] +    return dp[-1] + + +print((solve()))