class Solution {
public:
int fib(int N) {
if(N==0)return 0;
if(N==1)return 1;
int first=0,second=1;
for(int i=2;i<=N;i++)
{
int tmp = first+second;
first = second;
second = tmp;
}
return second;
}
};