# -*- coding: utf-8 -*-
"""
Created on Fri May  4 20:13:10 2018
ALDS1_10_A
@author: maezawa
"""

fib_arr = [None for _ in range(45)]
fib_arr[0] = 1
fib_arr[1] = 1

def fib(n):
    if fib_arr[n] != None:
        return fib_arr[n]
    fib_arr[n] = fib(n-1)+fib(n-2)
    return fib_arr[n]
    
n = int(input())
print(fib(n)) """
Created on Fri May  4 20:13:10 2018
ALDS1_10_A
@author: maezawa
""" None for _ in range(45) for _ in range(45) _ range(45) range 45 for _ in range(45) None fib_arr = [None for _ in range(45)] fib_arr [None for _ in range(45)] fib_arr[0] = 1 fib_arr[0] fib_arr 0 1 fib_arr[1] = 1 fib_arr[1] fib_arr 1 1 def fib(n):
    if fib_arr[n] != None:
        return fib_arr[n]
    fib_arr[n] = fib(n-1)+fib(n-2)
    return fib_arr[n]
     fib if fib_arr[n] != None:
        return fib_arr[n]
     fib_arr[n] != None fib_arr[n] fib_arr n None return fib_arr[n] fib_arr[n] fib_arr n fib_arr[n] = fib(n-1)+fib(n-2) fib_arr[n] fib_arr n fib(n-1)+fib(n-2) fib(n-1) fib n-1 n 1 fib(n-2) fib n-2 n 2 return fib_arr[n] fib_arr[n] fib_arr n n n n = int(input()) n int(input()) int input() input print(fib(n)) print fib(n) fib n n = int(input()) int(input()) n def fib(n):
    if fib_arr[n] != None:
        return fib_arr[n]
    fib_arr[n] = fib(n-1)+fib(n-2)
    return fib_arr[n]
     def fib(n):
    if fib_arr[n] != None:
        return fib_arr[n]
    fib_arr[n] = fib(n-1)+fib(n-2)
    return fib_arr[n]
     fib fib_arr = [None for _ in range(45)] [None for _ in range(45)] fib_arr
# -*- coding: utf-8 -*-
"""
Created on Fri May  4 20:13:10 2018
ALDS1_10_A
@author: maezawa
"""

fib_arr = [None for _ in range(45)]
fib_arr[0] = 1
fib_arr[1] = 1

def fib(n):
    if fib_arr[n] != None:
        return fib_arr[n]
    fib_arr[n] = fib(n-1)+fib(n-2)
    return fib_arr[n]
    
n = int(input())
print(fib(n))
