```
public class Solution {
public int ClimbStairs(int n) {
if (n <= 1) return 1;
int n1 = 1, n2 = 1;
int ret=0;
for (int i = 0; i < n-1; i++)
{
ret = n1 + n2;
n1 = n2;
n2 = ret;
}
return ret;
}
}
```