import sys
n = int(input())
if n == 1 or n == 2:
    print(1)
    sys.exit()
a,b = 1,1
for _ in range(n-2):
    c = a+b
    b = a
    a = c
print(a)