while True:
try:
n = int(input())
def count(i):
if i == 1 or i ==2:
return 1
elif i>2:
#count(i) = count(i-1)+count(i-2)
return count(i-1)+count(i-2)
print(count(n))
except:
break
try:
n = int(input())
def count(i):
if i == 1 or i ==2:
return 1
elif i>2:
#count(i) = count(i-1)+count(i-2)
return count(i-1)+count(i-2)
print(count(n))
except:
break