public class Solution {
public int Fibonacci(int n) {
if(n <= 0){
return 0;
}
if(n == 1 || n == 2){
return 1;
}
int m = 1, k = 1;
int result = 0;
int j = 3;
while(j <= n ){
result = m + k;
m = k;
k = result;
j ++;
}
return result;
}
}