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