```
class Solution {
public:
static double sqrt5;
static double goldenRatio;
int climbStairs(int n) {
if (n == 0) return 0;
if (n == 1) return 1;
return (pow(Solution::goldenRatio, n + 1) - pow(1 - Solution::goldenRatio, n + 1)) / Solution::sqrt5;
}
};
double Solution::sqrt5 = 2.2360679774997896964091736687313;
double Solution::goldenRatio = 1.61803398875;
```

Reference: https://www.mathsisfun.com/numbers/fibonacci-sequence.html