Climbing Stairs

EASY · C · 2000ms

Next puzzle: a player can climb a staircase 1 or 2 steps at a time — how many distinct ways are there to reach the top? You can climb 1 or 2 steps at a time. Given N total steps, print the number of distinct ways to reach the top.

Input

One integer N.

Output

Number of ways.

Constraints

1 ≤ N ≤ 45

Sample Input

4

Sample Output

5
main.c
Loading editor…

Write C, then Run (custom I/O) or Submit (sample tests). ⌘/Ctrl+Enter submits.

Climbing Stairs · DIU ContestHub