def memoize(f):  
    cache = {}  
    def helper(x):  
        if x not in cache:              
            cache[x] = f(x)  
        return cache[x]  
    return helper 
         
@memoize
def fib(n):
    if n in (0, 1):
        return 1
    else:
        return fib(n - 1) + fib(n - 2)
 
print(fib(int(input()))) def memoize(f):  
    cache = {}  
    def helper(x):  
        if x not in cache:              
            cache[x] = f(x)  
        return cache[x]  
    return helper 
          memoize 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 in (0, 1):
        return 1
    else:
        return fib(n - 1) + fib(n - 2)
  fib if n in (0, 1):
        return 1
    else:
        return fib(n - 1) + fib(n - 2)
  n in (0, 1) n (0, 1) 0 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 @memoize fib memoize fib print(fib(int(input()))) print fib(int(input())) fib int(input()) int input() input def fib(n):
    if n in (0, 1):
        return 1
    else:
        return fib(n - 1) + fib(n - 2)
  def fib(n):
    if n in (0, 1):
        return 1
    else:
        return fib(n - 1) + fib(n - 2)
  fib def memoize(f):  
    cache = {}  
    def helper(x):  
        if x not in cache:              
            cache[x] = f(x)  
        return cache[x]  
    return helper 
          def memoize(f):  
    cache = {}  
    def helper(x):  
        if x not in cache:              
            cache[x] = f(x)  
        return cache[x]  
    return helper 
          memoize
def memoize(f):  
    cache = {}  
    def helper(x):  
        if x not in cache:              
            cache[x] = f(x)  
        return cache[x]  
    return helper 
         
@memoize
def fib(n):
    if n in (0, 1):
        return 1
    else:
        return fib(n - 1) + fib(n - 2)
 
print(fib(int(input())))