class Solution { public: int Fibonacci(int n) { int a[65]={0}; a[0]=0; a[2]=1; a[1]=1; for(int i=3;i<=n;i++) a[i]=a[i-1]+a[i-2]; return a[n]; } };