a, b = 1, 1
for i in range(int(input())):
  a, b = b, a + b
print(a) a, b = 1, 1 a 1 b 1 for i in range(int(input())):
  a, b = b, a + b i range(int(input())) range int(input()) int input() input a, b = b, a + b a b b a + b a b print(a) print a a, b = b, a + b b a b = b, a + b a + b b b = 1, 1 1 b a, b = 1, 1 1 a
a, b = 1, 1
for i in range(int(input())):
  a, b = b, a + b
print(a)