n = int(input())
N =[1, 1, 2]
if n < 3:
    print(N[n])
else:
    i = 2
    while i < n:
        n0, n1, n2 = N
        N[2] = n1 + n2
        N[1] = n2
        N[0] = n1
        i += 1
    print(N[2]) n = int(input()) n int(input()) int input() input N =[1, 1, 2] N [1, 1, 2] 1 1 2 if n < 3:
    print(N[n])
else:
    i = 2
    while i < n:
        n0, n1, n2 = N
        N[2] = n1 + n2
        N[1] = n2
        N[0] = n1
        i += 1
    print(N[2]) n < 3 n 3 print(N[n]) print N[n] N n i = 2 i 2 while i < n:
        n0, n1, n2 = N
        N[2] = n1 + n2
        N[1] = n2
        N[0] = n1
        i += 1
     i < n i n n0, n1, n2 = N n0 N n1 n2 N[2] = n1 + n2 N[2] N 2 n1 + n2 n1 n2 N[1] = n2 N[1] N 1 n2 N[0] = n1 N[0] N 0 n1 i += 1 i 1 print(N[2]) print N[2] N 2 i += 1 1 i N =[1, 1, 2] [1, 1, 2] N n2 = N N n2 n = int(input()) int(input()) n i = 2 2 i n0, n1, n2 = N N n0 n1, n2 = N N n1
n = int(input())
N =[1, 1, 2]
if n < 3:
    print(N[n])
else:
    i = 2
    while i < n:
        n0, n1, n2 = N
        N[2] = n1 + n2
        N[1] = n2
        N[0] = n1
        i += 1
    print(N[2])
