# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
#
# 
# @param n int整型 
# @return int整型
# 给一个python的,就只会做入门题目......
#一开始用递归超时了,就用了查表
class Solution:
    def Fibonacci(self , n: int) -> int:
        # write code here
        res=[0,1,1]
        if n==1 or n==2:
            return res[n]
        index=3
        while index<=n:
            temp=res[index-1]+res[index-2]
            res.append(temp)
            index+=1
        return res[-1]