import sys
input = sys.stdin.readline

def fib2(n):
    n0,n1 = 1,1
    ans = 1
    for i in range(2,n+1):
        n0,n1 = n1,ans
        ans = n0 + n1
    return ans

if __name__ == "__main__":
    n = int(input())
    print(fib2(n))
 import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def fib2(n):
    n0,n1 = 1,1
    ans = 1
    for i in range(2,n+1):
        n0,n1 = n1,ans
        ans = n0 + n1
    return ans fib2 n0,n1 = 1,1 n0 1 n1 1 ans = 1 ans 1 for i in range(2,n+1):
        n0,n1 = n1,ans
        ans = n0 + n1
     i range(2,n+1) range 2 n+1 n 1 n0,n1 = n1,ans n0 n1 n1 ans ans = n0 + n1 ans n0 + n1 n0 n1 return ans ans n n if __name__ == "__main__":
    n = int(input())
    print(fib2(n)) __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input print(fib2(n)) print fib2(n) fib2 n input = sys.stdin.readline sys.stdin.readline input n = int(input()) int(input()) n def fib2(n):
    n0,n1 = 1,1
    ans = 1
    for i in range(2,n+1):
        n0,n1 = n1,ans
        ans = n0 + n1
    return ans def fib2(n):
    n0,n1 = 1,1
    ans = 1
    for i in range(2,n+1):
        n0,n1 = n1,ans
        ans = n0 + n1
    return ans fib2
import sys
input = sys.stdin.readline

def fib2(n):
    n0,n1 = 1,1
    ans = 1
    for i in range(2,n+1):
        n0,n1 = n1,ans
        ans = n0 + n1
    return ans

if __name__ == "__main__":
    n = int(input())
    print(fib2(n))

