n=int(input())
def fn(n):
f=[0 for i in range(n)]
for i in range(n):
if i==0:
f[0]=1
elif i==1:
f[1]=2
else:
f[i]=f[i-1]+f[i-2]
return f
f=fn(n)
print(f[n-1])
n=int(input())
def fn(n):
f=[0 for i in range(n)]
for i in range(n):
if i==0:
f[0]=1
elif i==1:
f[1]=2
else:
f[i]=f[i-1]+f[i-2]
return f
f=fn(n)
print(f[n-1])