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


def memoize(proc):
    cache = {}

    def helper(*args, **kargs):
        if args not in cache:
            cache[args] = proc(*args, **kargs)
        return cache[args]

    return helper


@memoize
def fib(n):
    if n < 2:
        return 1
    else:
        return fib(n - 1) + fib(n - 2)


if __name__ == "__main__":
    print(fib(int(input()))) def memoize(proc):
    cache = {}

    def helper(*args, **kargs):
        if args not in cache:
            cache[args] = proc(*args, **kargs)
        return cache[args]

    return helper memoize cache = {} cache {} def helper(*args, **kargs):
        if args not in cache:
            cache[args] = proc(*args, **kargs)
        return cache[args]

     helper if args not in cache:
            cache[args] = proc(*args, **kargs)
         args not in cache args cache cache[args] = proc(*args, **kargs) cache[args] cache args proc(*args, **kargs) proc *args args **kargs kargs return cache[args] cache[args] cache args *args **kargs return helper helper proc proc def fib(n):
    if n < 2:
        return 1
    else:
        return fib(n - 1) + fib(n - 2) fib if n < 2:
        return 1
    else:
        return fib(n - 1) + fib(n - 2) n < 2 n 2 return 1 1 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 @memoize fib memoize fib 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 memoize(proc):
    cache = {}

    def helper(*args, **kargs):
        if args not in cache:
            cache[args] = proc(*args, **kargs)
        return cache[args]

    return helper def memoize(proc):
    cache = {}

    def helper(*args, **kargs):
        if args not in cache:
            cache[args] = proc(*args, **kargs)
        return cache[args]

    return helper memoize def fib(n):
    if n < 2:
        return 1
    else:
        return fib(n - 1) + fib(n - 2) def fib(n):
    if n < 2:
        return 1
    else:
        return fib(n - 1) + fib(n - 2) fib
# -*- coding:utf-8 -*-


def memoize(proc):
    cache = {}

    def helper(*args, **kargs):
        if args not in cache:
            cache[args] = proc(*args, **kargs)
        return cache[args]

    return helper


@memoize
def fib(n):
    if n < 2:
        return 1
    else:
        return fib(n - 1) + fib(n - 2)


if __name__ == "__main__":
    print(fib(int(input())))