A=1
B=1
C=0 #２つ前の項
D=0 #1
N=int(input())
if N==0 or N==1:
    print(1)
elif N==2:
    print(2)

else:   
    C=B  #１
    D=A+B #2
    for i in range (N-3):
        B=C
        C=D
        D=B+C
    print(C+D) A=1 A 1 B=1 B 1 C=0 C 0 D=0 D 0 N=int(input()) N int(input()) int input() input if N==0 or N==1:
    print(1)
elif N==2:
    print(2)

else:   
    C=B  #１
    D=A+B #2
    for i in range (N-3):
        B=C
        C=D
        D=B+C
    print(C+D) N==0 or N==1 N==0 N 0 N==1 N 1 print(1) print 1 elif N==2:
    print(2) N==2 N 2 print(2) print 2 C=B C B D=A+B D A+B A B for i in range (N-3):
        B=C
        C=D
        D=B+C
     i range (N-3) range N-3 N 3 B=C B C C=D C D D=B+C D B+C B C print(C+D) print C+D C D D=A+B A+B D C=0 0 C C=B B C B=C C B D=0 0 D C=D D C B=1 1 B N=int(input()) int(input()) N A=1 1 A D=B+C B+C D
A=1
B=1
C=0 #２つ前の項
D=0 #1
N=int(input())
if N==0 or N==1:
    print(1)
elif N==2:
    print(2)

else:   
    C=B  #１
    D=A+B #2
    for i in range (N-3):
        B=C
        C=D
        D=B+C
    print(C+D)
