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