class Solution { public: int climbStairs(int n) { if(n == 1)return 1; if(n == 2)return 2; int x = 1; int y = 2; while(n-2){ int t = y; y = x+y; x = t; n--; } return y; } };