/**
* @param {number} n
* @return {number}
*/
var climbStairs = function(n, step = 2) {
if (n < 2) return n;
let first = 1;
let second = 2;
let cnt = 2;
while (cnt < n) {
const temp = second;
second = first + second;
first = temp;
cnt++;
}
return second;
};