from functools import lru_cache


@lru_cache(maxsize=None)
def fib(n):
    if n < 2:
        return n
    return fib(n-1) + fib(n-2)


class Fibonacci(object):
    memo = [1, 1]

    def get_nth(self, n):
        if n < len(Fibonacci.memo):
            return Fibonacci.memo[n]
        # print('fib({0}) not found'.format(n))
        for i in range(len(Fibonacci.memo), n+1):
            result = Fibonacci.memo[i-1] + Fibonacci.memo[i-2]
            Fibonacci.memo.append(result)
            # print('fib({0})={1} append'.format(i, result))
        return Fibonacci.memo[n]


if __name__ == '__main__':
    # ??????????????\???
    num = int(input())

    # ?????£??????????????°????¨????
    #f = Fibonacci()
    #result = f.get_nth(num)
    result = fib(num+1)

    # ???????????????
    print('{0}'.format(result)) from functools import lru_cache def fib(n):
    if n < 2:
        return n
    return fib(n-1) + fib(n-2) fib if n < 2:
        return n
     n < 2 n 2 return n n return fib(n-1) + fib(n-2) fib(n-1) + fib(n-2) fib(n-1) fib n-1 n 1 fib(n-2) fib n-2 n 2 n n @lru_cache(maxsize=None) fib maxsize=None @lru_cache(maxsize=None) lru_cache maxsize=None maxsize None fib class Fibonacci(object):
    memo = [1, 1]

    def get_nth(self, n):
        if n < len(Fibonacci.memo):
            return Fibonacci.memo[n]
        # print('fib({0}) not found'.format(n))
        for i in range(len(Fibonacci.memo), n+1):
            result = Fibonacci.memo[i-1] + Fibonacci.memo[i-2]
            Fibonacci.memo.append(result)
            # print('fib({0})={1} append'.format(i, result))
        return Fibonacci.memo[n] Fibonacci memo = [1, 1] memo [1, 1] 1 1 def get_nth(self, n):
        if n < len(Fibonacci.memo):
            return Fibonacci.memo[n]
        # print('fib({0}) not found'.format(n))
        for i in range(len(Fibonacci.memo), n+1):
            result = Fibonacci.memo[i-1] + Fibonacci.memo[i-2]
            Fibonacci.memo.append(result)
            # print('fib({0})={1} append'.format(i, result))
        return Fibonacci.memo[n] get_nth if n < len(Fibonacci.memo):
            return Fibonacci.memo[n]
        # print('fib({0}) not found'.format(n))
         n < len(Fibonacci.memo) n len(Fibonacci.memo) len Fibonacci.memo Fibonacci memo return Fibonacci.memo[n] Fibonacci.memo[n] Fibonacci.memo Fibonacci memo n for i in range(len(Fibonacci.memo), n+1):
            result = Fibonacci.memo[i-1] + Fibonacci.memo[i-2]
            Fibonacci.memo.append(result)
            # print('fib({0})={1} append'.format(i, result))
         i range(len(Fibonacci.memo), n+1) range len(Fibonacci.memo) len Fibonacci.memo Fibonacci memo n+1 n 1 result = Fibonacci.memo[i-1] + Fibonacci.memo[i-2] result Fibonacci.memo[i-1] + Fibonacci.memo[i-2] Fibonacci.memo[i-1] Fibonacci.memo Fibonacci memo i-1 i 1 Fibonacci.memo[i-2] Fibonacci.memo Fibonacci memo i-2 i 2 Fibonacci.memo.append(result) Fibonacci.memo.append Fibonacci.memo Fibonacci memo append result return Fibonacci.memo[n] Fibonacci.memo[n] Fibonacci.memo Fibonacci memo n self self n n object if __name__ == '__main__':
    # ??????????????\???
    num = int(input())

    # ?????£??????????????°????¨????
    #f = Fibonacci()
    #result = f.get_nth(num)
    result = fib(num+1)

    # ???????????????
    print('{0}'.format(result)) __name__ == '__main__' __name__ '__main__' num = int(input()) num int(input()) int input() input result = fib(num+1) result fib(num+1) fib num+1 num 1 print('{0}'.format(result)) print '{0}'.format(result) '{0}'.format '{0}' format result num = int(input()) int(input()) num class Fibonacci(object):
    memo = [1, 1]

    def get_nth(self, n):
        if n < len(Fibonacci.memo):
            return Fibonacci.memo[n]
        # print('fib({0}) not found'.format(n))
        for i in range(len(Fibonacci.memo), n+1):
            result = Fibonacci.memo[i-1] + Fibonacci.memo[i-2]
            Fibonacci.memo.append(result)
            # print('fib({0})={1} append'.format(i, result))
        return Fibonacci.memo[n] class Fibonacci(object):
    memo = [1, 1]

    def get_nth(self, n):
        if n < len(Fibonacci.memo):
            return Fibonacci.memo[n]
        # print('fib({0}) not found'.format(n))
        for i in range(len(Fibonacci.memo), n+1):
            result = Fibonacci.memo[i-1] + Fibonacci.memo[i-2]
            Fibonacci.memo.append(result)
            # print('fib({0})={1} append'.format(i, result))
        return Fibonacci.memo[n] Fibonacci def fib(n):
    if n < 2:
        return n
    return fib(n-1) + fib(n-2) def fib(n):
    if n < 2:
        return n
    return fib(n-1) + fib(n-2) fib result = fib(num+1) fib(num+1) result
from functools import lru_cache


@lru_cache(maxsize=None)
def fib(n):
    if n < 2:
        return n
    return fib(n-1) + fib(n-2)


class Fibonacci(object):
    memo = [1, 1]

    def get_nth(self, n):
        if n < len(Fibonacci.memo):
            return Fibonacci.memo[n]
        # print('fib({0}) not found'.format(n))
        for i in range(len(Fibonacci.memo), n+1):
            result = Fibonacci.memo[i-1] + Fibonacci.memo[i-2]
            Fibonacci.memo.append(result)
            # print('fib({0})={1} append'.format(i, result))
        return Fibonacci.memo[n]


if __name__ == '__main__':
    # ??????????????\???
    num = int(input())

    # ?????£??????????????°????¨????
    #f = Fibonacci()
    #result = f.get_nth(num)
    result = fib(num+1)

    # ???????????????
    print('{0}'.format(result))