def solve(n):
    if n <= 1:
        print(1)
        return

    a, b = 1, 1
    for _ in range(2, n + 1):
        c = a + b
        b = a
        a = c
    print(c)

if __name__ == "__main__":
    n = int(input())
    solve(n) def solve(n):
    if n <= 1:
        print(1)
        return

    a, b = 1, 1
    for _ in range(2, n + 1):
        c = a + b
        b = a
        a = c
    print(c) solve if n <= 1:
        print(1)
        return

     n <= 1 n 1 print(1) print 1 return a, b = 1, 1 a 1 b 1 for _ in range(2, n + 1):
        c = a + b
        b = a
        a = c
     _ range(2, n + 1) range 2 n + 1 n 1 c = a + b c a + b a b b = a b a a = c a c print(c) print c n n if __name__ == "__main__":
    n = int(input())
    solve(n) __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input solve(n) solve n n = int(input()) int(input()) n def solve(n):
    if n <= 1:
        print(1)
        return

    a, b = 1, 1
    for _ in range(2, n + 1):
        c = a + b
        b = a
        a = c
    print(c) def solve(n):
    if n <= 1:
        print(1)
        return

    a, b = 1, 1
    for _ in range(2, n + 1):
        c = a + b
        b = a
        a = c
    print(c) solve
def solve(n):
    if n <= 1:
        print(1)
        return

    a, b = 1, 1
    for _ in range(2, n + 1):
        c = a + b
        b = a
        a = c
    print(c)

if __name__ == "__main__":
    n = int(input())
    solve(n)
