class Solution {
public:
int Fibonacci(int n) {
int x, y, z;
x = 0, y = 1;
if (n == 0 || n == 1) return n;
else
{
for (int i = 2; i <= n; i ++ )
{
z = x + y;
x = y;
y = z;
}
return z;
}
}
};