class Solution {
public:
/**
* @param n: An integer
* @return: An integer
*/
int climbStairs(int n) {
// write your code here
if(n==0||n==1)
return 1;
int temp=0;
int a=1,b=2;
while(n-->2)
{
temp=b;
b=a+b;
a=temp;
}
return b;
}
};