def memolize(f):
    cache = {}

    def helper(x):
        if x not in cache:
            cache[x] = f(x)
        return cache[x]
    return helper

@memolize
def fib(n):
    if n == 0:
        return 1
    elif n == 1:
        return 1

    return fib(n - 1) + fib(n - 2)

n = int(input())
print(fib(n))
 def memolize(f):
    cache = {}

    def helper(x):
        if x not in cache:
            cache[x] = f(x)
        return cache[x]
    return helper memolize cache = {} cache {} def helper(x):
        if x not in cache:
            cache[x] = f(x)
        return cache[x]
     helper if x not in cache:
            cache[x] = f(x)
         x not in cache x cache cache[x] = f(x) cache[x] cache x f(x) f x return cache[x] cache[x] cache x x x return helper helper f f def fib(n):
    if n == 0:
        return 1
    elif n == 1:
        return 1

    return fib(n - 1) + fib(n - 2) fib if n == 0:
        return 1
    elif n == 1:
        return 1

     n == 0 n 0 return 1 1 elif n == 1:
        return 1

     n == 1 n 1 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 @memolize fib memolize fib n = int(input()) n int(input()) int input() input print(fib(n)) print fib(n) fib n def memolize(f):
    cache = {}

    def helper(x):
        if x not in cache:
            cache[x] = f(x)
        return cache[x]
    return helper def memolize(f):
    cache = {}

    def helper(x):
        if x not in cache:
            cache[x] = f(x)
        return cache[x]
    return helper memolize n = int(input()) int(input()) n def fib(n):
    if n == 0:
        return 1
    elif n == 1:
        return 1

    return fib(n - 1) + fib(n - 2) def fib(n):
    if n == 0:
        return 1
    elif n == 1:
        return 1

    return fib(n - 1) + fib(n - 2) fib
def memolize(f):
    cache = {}

    def helper(x):
        if x not in cache:
            cache[x] = f(x)
        return cache[x]
    return helper

@memolize
def fib(n):
    if n == 0:
        return 1
    elif n == 1:
        return 1

    return fib(n - 1) + fib(n - 2)

n = int(input())
print(fib(n))

