```
int climbStairs(int n) {
return (int)(1/sqrt(5)*(pow((1+sqrt(5))/2,n+1)-pow((1-sqrt(5))/2,n+1)));
}
```

Is Fibonacci, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …

In our case, is 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, …

So, replace n with n+1

or

```
int climbStairs(int n) {
int n_1 = 1;
int n_2 = 0;
int tmp;
for(int i=1; i<=n; i++){
tmp = n_1+n_2;
n_2 = n_1;
n_1 = tmp;
}
return tmp;
}
```

according to: