27: Climb stairs

Given a staircase with a number of steps. Count how many distinct ways can you climb the stairs. In one step, you can climb one or two steps

 

Example 1

Input: 1

Output: 1

Explanation: One way to go up the stairs

Example 2

Input: 2

Output: 2

Explanation: Two ways climb the stairs:

  • Climbing by one step
  • Climbing by two steps