public int climbStairs(int n) {
        if(n < 0)
            return 0;
        if(n < 3)
            return n;
            
        int step_a = 1;
        int step_b = 2;
        int result = 0;
        for(int i=3;i<=n;i++)
        {
            result = step_a + step_b;
            step_a = step_b;
            step_b = result;
        }
        return result;
    }