n = int(input())prev, curr = 1, 3 # 初始化前兩項for i in range(2, n): prev, curr = curr, prev + curr # 更新前兩項的值print(curr) # 輸出第n項的值