|
Лимит времени 1000/1000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Problem description
There is a ball at the top of the ladder containing N steps. All of a sudden it starts jumping down the stairs and it appears that the ball can jump to next step, on the step after one and on the step after two (that is if the ball lies on the step number 3 it can jump to steps number 4, 5 and 6). How many different routes are there the ball can reach last stair?
Input
A single integer: N, number of stairs (0 < N < 31).
Output
Single integer, number of different routes.
Example
Для отправки решений необходимо выполнить вход.
|