ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > C. T. 2011 > задача:


Мячик

Задачи сборника

• Железнодорожный разъезд
• Замок
• Лабиринт
• Лыжники
• Матрица
• Минимумы на отрезке
• Министерство правды
• Монеты и гнезда
• Мячик
• Огромная паркова
• Площади островов.
• Прогрессия
• Проходной балл
• Ситха джедай против
• Сортировка времени
• Треугольник2

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 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

stdin stdout

2

2

3 4
Для отправки решений необходимо выполнить вход.

www.contester.ru