cheetcode

99. Climbing StairsEasy

Count how many ways you can reach the top using 1-step and 2-step moves.

You are climbing a staircase. It takes n steps to reach the top.

Each time you can either climb 1 or 2 steps. Return the number of distinct ways to reach the top.

Examples

Input: n = 2
Output: 2
Input: n = 3
Output: 3
Input: n = 5
Output: 8

Constraints

  • 1 <= n <= 45