n = int(input())

def fib(n):
    dp = [0] * (n+1)
    dp[0] = 1
    dp[1] = 1

    def fib_sub(n):
        if dp[n] != 0:
            return dp[n]

        fibn1 = fib_sub(n-1)
        fibn2 = fib_sub(n-2)
        dp[n-1] = fibn1
        dp[n-2] = fibn2
        return fibn1 + fibn2

    return fib_sub(n)
print(fib(n))
 n = int(input()) n int(input()) int input() input def fib(n):
    dp = [0] * (n+1)
    dp[0] = 1
    dp[1] = 1

    def fib_sub(n):
        if dp[n] != 0:
            return dp[n]

        fibn1 = fib_sub(n-1)
        fibn2 = fib_sub(n-2)
        dp[n-1] = fibn1
        dp[n-2] = fibn2
        return fibn1 + fibn2

    return fib_sub(n) fib dp = [0] * (n+1) dp [0] * (n+1) [0] 0 n+1 n 1 dp[0] = 1 dp[0] dp 0 1 dp[1] = 1 dp[1] dp 1 1 def fib_sub(n):
        if dp[n] != 0:
            return dp[n]

        fibn1 = fib_sub(n-1)
        fibn2 = fib_sub(n-2)
        dp[n-1] = fibn1
        dp[n-2] = fibn2
        return fibn1 + fibn2

     fib_sub if dp[n] != 0:
            return dp[n]

         dp[n] != 0 dp[n] dp n 0 return dp[n] dp[n] dp n fibn1 = fib_sub(n-1) fibn1 fib_sub(n-1) fib_sub n-1 n 1 fibn2 = fib_sub(n-2) fibn2 fib_sub(n-2) fib_sub n-2 n 2 dp[n-1] = fibn1 dp[n-1] dp n-1 n 1 fibn1 dp[n-2] = fibn2 dp[n-2] dp n-2 n 2 fibn2 return fibn1 + fibn2 fibn1 + fibn2 fibn1 fibn2 n n return fib_sub(n) fib_sub(n) fib_sub n n n print(fib(n)) print fib(n) fib n n = int(input()) int(input()) n def fib(n):
    dp = [0] * (n+1)
    dp[0] = 1
    dp[1] = 1

    def fib_sub(n):
        if dp[n] != 0:
            return dp[n]

        fibn1 = fib_sub(n-1)
        fibn2 = fib_sub(n-2)
        dp[n-1] = fibn1
        dp[n-2] = fibn2
        return fibn1 + fibn2

    return fib_sub(n) def fib(n):
    dp = [0] * (n+1)
    dp[0] = 1
    dp[1] = 1

    def fib_sub(n):
        if dp[n] != 0:
            return dp[n]

        fibn1 = fib_sub(n-1)
        fibn2 = fib_sub(n-2)
        dp[n-1] = fibn1
        dp[n-2] = fibn2
        return fibn1 + fibn2

    return fib_sub(n) fib
n = int(input())

def fib(n):
    dp = [0] * (n+1)
    dp[0] = 1
    dp[1] = 1

    def fib_sub(n):
        if dp[n] != 0:
            return dp[n]

        fibn1 = fib_sub(n-1)
        fibn2 = fib_sub(n-2)
        dp[n-1] = fibn1
        dp[n-2] = fibn2
        return fibn1 + fibn2

    return fib_sub(n)
print(fib(n))

