# -*- coding: utf-8 -*-


if __name__ == '__main__':

    n = int(input())
    F = [None]*(n+1)

    def fibonacci(n):
        if n == 0 or n == 1:
            F[n] = 1
            return F[n]
        if F[n] is not None:
            return F[n]
        
        F[n] = fibonacci(n-2) + fibonacci(n-1)
        return F[n]

    print(fibonacci(n))

 if __name__ == '__main__':

    n = int(input())
    F = [None]*(n+1)

    def fibonacci(n):
        if n == 0 or n == 1:
            F[n] = 1
            return F[n]
        if F[n] is not None:
            return F[n]
        
        F[n] = fibonacci(n-2) + fibonacci(n-1)
        return F[n]

    print(fibonacci(n)) __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input F = [None]*(n+1) F [None]*(n+1) [None] None n+1 n 1 def fibonacci(n):
        if n == 0 or n == 1:
            F[n] = 1
            return F[n]
        if F[n] is not None:
            return F[n]
        
        F[n] = fibonacci(n-2) + fibonacci(n-1)
        return F[n]

     fibonacci if n == 0 or n == 1:
            F[n] = 1
            return F[n]
         n == 0 or n == 1 n == 0 n 0 n == 1 n 1 F[n] = 1 F[n] F n 1 return F[n] F[n] F n if F[n] is not None:
            return F[n]
        
         F[n] is not None F[n] F n None return F[n] F[n] F n F[n] = fibonacci(n-2) + fibonacci(n-1) F[n] F n fibonacci(n-2) + fibonacci(n-1) fibonacci(n-2) fibonacci n-2 n 2 fibonacci(n-1) fibonacci n-1 n 1 return F[n] F[n] F n n n print(fibonacci(n)) print fibonacci(n) fibonacci n n = int(input()) int(input()) n def fibonacci(n):
        if n == 0 or n == 1:
            F[n] = 1
            return F[n]
        if F[n] is not None:
            return F[n]
        
        F[n] = fibonacci(n-2) + fibonacci(n-1)
        return F[n]

     def fibonacci(n):
        if n == 0 or n == 1:
            F[n] = 1
            return F[n]
        if F[n] is not None:
            return F[n]
        
        F[n] = fibonacci(n-2) + fibonacci(n-1)
        return F[n]

     fibonacci F = [None]*(n+1) [None]*(n+1) F
# -*- coding: utf-8 -*-


if __name__ == '__main__':

    n = int(input())
    F = [None]*(n+1)

    def fibonacci(n):
        if n == 0 or n == 1:
            F[n] = 1
            return F[n]
        if F[n] is not None:
            return F[n]
        
        F[n] = fibonacci(n-2) + fibonacci(n-1)
        return F[n]

    print(fibonacci(n))


