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

def main():
    def _fibonacci(n,cache):
        if n in cache:
            return cache[n]

        elif n == 0 or n == 1:
            ret = 1
            cache[n] = ret
            return ret
        else:
            ret = _fibonacci(n - 1, cache) + _fibonacci(n - 2, cache)
            cache[n] = ret
            return ret

    N = int(raw_input())
    cache = {}
    return _fibonacci(N,cache)

print main() def main():
    def _fibonacci(n,cache):
        if n in cache:
            return cache[n]

        elif n == 0 or n == 1:
            ret = 1
            cache[n] = ret
            return ret
        else:
            ret = _fibonacci(n - 1, cache) + _fibonacci(n - 2, cache)
            cache[n] = ret
            return ret

    N = int(raw_input())
    cache = {}
    return _fibonacci(N,cache) main def _fibonacci(n,cache):
        if n in cache:
            return cache[n]

        elif n == 0 or n == 1:
            ret = 1
            cache[n] = ret
            return ret
        else:
            ret = _fibonacci(n - 1, cache) + _fibonacci(n - 2, cache)
            cache[n] = ret
            return ret

     _fibonacci if n in cache:
            return cache[n]

        elif n == 0 or n == 1:
            ret = 1
            cache[n] = ret
            return ret
        else:
            ret = _fibonacci(n - 1, cache) + _fibonacci(n - 2, cache)
            cache[n] = ret
            return ret

     n in cache n cache return cache[n] cache[n] cache n elif n == 0 or n == 1:
            ret = 1
            cache[n] = ret
            return ret
         n == 0 or n == 1 n == 0 n 0 n == 1 n 1 ret = 1 ret 1 cache[n] = ret cache[n] cache n ret return ret ret ret = _fibonacci(n - 1, cache) + _fibonacci(n - 2, cache) ret _fibonacci(n - 1, cache) + _fibonacci(n - 2, cache) _fibonacci(n - 1, cache) _fibonacci n - 1 n 1 cache _fibonacci(n - 2, cache) _fibonacci n - 2 n 2 cache cache[n] = ret cache[n] cache n ret return ret ret n n cache cache N = int(raw_input()) N int(raw_input()) int raw_input() raw_input cache = {} cache {} return _fibonacci(N,cache) _fibonacci(N,cache) _fibonacci N cache print main() main def main():
    def _fibonacci(n,cache):
        if n in cache:
            return cache[n]

        elif n == 0 or n == 1:
            ret = 1
            cache[n] = ret
            return ret
        else:
            ret = _fibonacci(n - 1, cache) + _fibonacci(n - 2, cache)
            cache[n] = ret
            return ret

    N = int(raw_input())
    cache = {}
    return _fibonacci(N,cache) def main():
    def _fibonacci(n,cache):
        if n in cache:
            return cache[n]

        elif n == 0 or n == 1:
            ret = 1
            cache[n] = ret
            return ret
        else:
            ret = _fibonacci(n - 1, cache) + _fibonacci(n - 2, cache)
            cache[n] = ret
            return ret

    N = int(raw_input())
    cache = {}
    return _fibonacci(N,cache) main
# -*- coding: utf-8 -*-

def main():
    def _fibonacci(n,cache):
        if n in cache:
            return cache[n]

        elif n == 0 or n == 1:
            ret = 1
            cache[n] = ret
            return ret
        else:
            ret = _fibonacci(n - 1, cache) + _fibonacci(n - 2, cache)
            cache[n] = ret
            return ret

    N = int(raw_input())
    cache = {}
    return _fibonacci(N,cache)

print main()