import sys
N = int(sys.stdin.readline())

def fibonacci(N):
    cache = [0 for index in range(N+1)]
    cache[0] = 0
    cache[1] = 1
    for index in range(2, N+1):
        cache[index] = cache[index-1] + cache[index-2]
    return cache[N]

print(fibonacci(N))