x=int(input())
if x == 0 or x == 1 : print("1")
else : 
    i=0
    b=1
    c=1
    while i<(x-1) :
        d=b+c
        c=b
        b=d
        i=i+1
        
    print(b)
         x=int(input()) x int(input()) int input() input if x == 0 or x == 1 : print("1")
else : 
    i=0
    b=1
    c=1
    while i<(x-1) :
        d=b+c
        c=b
        b=d
        i=i+1
        
    print(b)
         x == 0 or x == 1 x == 0 x 0 x == 1 x 1 i=0 i 0 b=1 b 1 c=1 c 1 while i<(x-1) :
        d=b+c
        c=b
        b=d
        i=i+1
        
     i<(x-1) i x-1 x 1 d=b+c d b+c b c c=b c b b=d b d i=i+1 i i+1 i 1 print(b) print b x=int(input()) int(input()) x b=d d b c=b b c i=i+1 i+1 i i=0 0 i c=1 1 c b=1 1 b d=b+c b+c d
x=int(input())
if x == 0 or x == 1 : print("1")
else : 
    i=0
    b=1
    c=1
    while i<(x-1) :
        d=b+c
        c=b
        b=d
        i=i+1
        
    print(b)
        
