def fib(n):
    F = {0:1, 1:1}
    def fibonacci(n):
        ans = F.get(n,-1)
        if ans > 0: return ans
        F[n] = fibonacci(n-1) + fibonacci(n-2)
        return F[n]
    return fibonacci(n)
        
if __name__=='__main__':
    print(fib(int(input()))) def fib(n):
    F = {0:1, 1:1}
    def fibonacci(n):
        ans = F.get(n,-1)
        if ans > 0: return ans
        F[n] = fibonacci(n-1) + fibonacci(n-2)
        return F[n]
    return fibonacci(n)
         fib F = {0:1, 1:1} F {0:1, 1:1} 0 0 1 1 1 1 def fibonacci(n):
        ans = F.get(n,-1)
        if ans > 0: return ans
        F[n] = fibonacci(n-1) + fibonacci(n-2)
        return F[n]
     fibonacci ans = F.get(n,-1) ans F.get(n,-1) F.get F get n -1 if ans > 0: return ans
         ans > 0 ans 0 F[n] = fibonacci(n-1) + fibonacci(n-2) F[n] F n fibonacci(n-1) + fibonacci(n-2) fibonacci(n-1) fibonacci n-1 n 1 fibonacci(n-2) fibonacci n-2 n 2 return F[n] F[n] F n n n return fibonacci(n) fibonacci(n) fibonacci n n n if __name__=='__main__':
    print(fib(int(input()))) __name__=='__main__' __name__ '__main__' print(fib(int(input()))) print fib(int(input())) fib int(input()) int input() input def fib(n):
    F = {0:1, 1:1}
    def fibonacci(n):
        ans = F.get(n,-1)
        if ans > 0: return ans
        F[n] = fibonacci(n-1) + fibonacci(n-2)
        return F[n]
    return fibonacci(n)
         def fib(n):
    F = {0:1, 1:1}
    def fibonacci(n):
        ans = F.get(n,-1)
        if ans > 0: return ans
        F[n] = fibonacci(n-1) + fibonacci(n-2)
        return F[n]
    return fibonacci(n)
         fib
def fib(n):
    F = {0:1, 1:1}
    def fibonacci(n):
        ans = F.get(n,-1)
        if ans > 0: return ans
        F[n] = fibonacci(n-1) + fibonacci(n-2)
        return F[n]
    return fibonacci(n)
        
if __name__=='__main__':
    print(fib(int(input())))