动态规划方法
int numWays(int n){
if (n == 0) return 1;
if (n == 1) return 1;
if (n == 2) return 2;
unsigned long long t1 = 2, t2 = 1, result = 0;
for (int i = 3;i <= n;++i) {
result = (t1 + t2)%1000000007;
t2 = t1;
t1 = result;
}
if (result == 1000000008) return 1;
return result;
}