a=[0]*45

def Fib(n):
    if n == 0:
        a[0]=1
        return 1
    elif n == 1:
        a[1]=1
        return 1
    else:
        if a[n]==0:
            a[n]=Fib(n-1)+Fib(n-2)
            return a[n]
        else:
            return a[n]
    
n=int(input())
print(Fib(n))

 a=[0]*45 a [0]*45 [0] 0 45 def Fib(n):
    if n == 0:
        a[0]=1
        return 1
    elif n == 1:
        a[1]=1
        return 1
    else:
        if a[n]==0:
            a[n]=Fib(n-1)+Fib(n-2)
            return a[n]
        else:
            return a[n]
     Fib if n == 0:
        a[0]=1
        return 1
    elif n == 1:
        a[1]=1
        return 1
    else:
        if a[n]==0:
            a[n]=Fib(n-1)+Fib(n-2)
            return a[n]
        else:
            return a[n]
     n == 0 n 0 a[0]=1 a[0] a 0 1 return 1 1 elif n == 1:
        a[1]=1
        return 1
     n == 1 n 1 a[1]=1 a[1] a 1 1 return 1 1 if a[n]==0:
            a[n]=Fib(n-1)+Fib(n-2)
            return a[n]
        else:
            return a[n]
     a[n]==0 a[n] a n 0 a[n]=Fib(n-1)+Fib(n-2) a[n] a n Fib(n-1)+Fib(n-2) Fib(n-1) Fib n-1 n 1 Fib(n-2) Fib n-2 n 2 return a[n] a[n] a n return a[n] a[n] a n n n n=int(input()) n int(input()) int input() input print(Fib(n)) print Fib(n) Fib n a=[0]*45 [0]*45 a def Fib(n):
    if n == 0:
        a[0]=1
        return 1
    elif n == 1:
        a[1]=1
        return 1
    else:
        if a[n]==0:
            a[n]=Fib(n-1)+Fib(n-2)
            return a[n]
        else:
            return a[n]
     def Fib(n):
    if n == 0:
        a[0]=1
        return 1
    elif n == 1:
        a[1]=1
        return 1
    else:
        if a[n]==0:
            a[n]=Fib(n-1)+Fib(n-2)
            return a[n]
        else:
            return a[n]
     Fib n=int(input()) int(input()) n
a=[0]*45

def Fib(n):
    if n == 0:
        a[0]=1
        return 1
    elif n == 1:
        a[1]=1
        return 1
    else:
        if a[n]==0:
            a[n]=Fib(n-1)+Fib(n-2)
            return a[n]
        else:
            return a[n]
    
n=int(input())
print(Fib(n))


