A={0:0, 1:1} def Fib(n): if n not in A: A[n]=Fib(n-1)+Fib(n-2) return A[n] print(Fib(8))