def deco_fibo(func):
    answer_list = [1, 1] + [None] * 43
    def main_fibo(i):
        ans = answer_list[i]
        if ans:
            return ans
        ans = func(i)
        answer_list[i] = ans
        return ans
    return main_fibo

@deco_fibo
def fibo(num):
    return fibo(num - 1) + fibo(num - 2)


n = int(input())

print(fibo(n)) def deco_fibo(func):
    answer_list = [1, 1] + [None] * 43
    def main_fibo(i):
        ans = answer_list[i]
        if ans:
            return ans
        ans = func(i)
        answer_list[i] = ans
        return ans
    return main_fibo deco_fibo answer_list = [1, 1] + [None] * 43 answer_list [1, 1] + [None] * 43 [1, 1] 1 1 [None] * 43 [None] None 43 def main_fibo(i):
        ans = answer_list[i]
        if ans:
            return ans
        ans = func(i)
        answer_list[i] = ans
        return ans
     main_fibo ans = answer_list[i] ans answer_list[i] answer_list i if ans:
            return ans
         ans return ans ans ans = func(i) ans func(i) func i answer_list[i] = ans answer_list[i] answer_list i ans return ans ans i i return main_fibo main_fibo func func def fibo(num):
    return fibo(num - 1) + fibo(num - 2) fibo return fibo(num - 1) + fibo(num - 2) fibo(num - 1) + fibo(num - 2) fibo(num - 1) fibo num - 1 num 1 fibo(num - 2) fibo num - 2 num 2 num num @deco_fibo fibo deco_fibo fibo n = int(input()) n int(input()) int input() input print(fibo(n)) print fibo(n) fibo n n = int(input()) int(input()) n def deco_fibo(func):
    answer_list = [1, 1] + [None] * 43
    def main_fibo(i):
        ans = answer_list[i]
        if ans:
            return ans
        ans = func(i)
        answer_list[i] = ans
        return ans
    return main_fibo def deco_fibo(func):
    answer_list = [1, 1] + [None] * 43
    def main_fibo(i):
        ans = answer_list[i]
        if ans:
            return ans
        ans = func(i)
        answer_list[i] = ans
        return ans
    return main_fibo deco_fibo def fibo(num):
    return fibo(num - 1) + fibo(num - 2) def fibo(num):
    return fibo(num - 1) + fibo(num - 2) fibo
def deco_fibo(func):
    answer_list = [1, 1] + [None] * 43
    def main_fibo(i):
        ans = answer_list[i]
        if ans:
            return ans
        ans = func(i)
        answer_list[i] = ans
        return ans
    return main_fibo

@deco_fibo
def fibo(num):
    return fibo(num - 1) + fibo(num - 2)


n = int(input())

print(fibo(n))