n=int(input())
a=[1,1]
if n==1 or n==2:
    print('1')
else:
    for i in range(0,n-2):
        a.append(a[i]+a[i+1])
    print(a[-1])