n = int(input()) a, b = 1, 1 if n == 1 or n == 2: print(1) else: for _ in range(3, n + 1): a, b = b, a + b print(b)