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

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


Chess

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

• GCF
• Bfs
• Heap
• Chess
• Profits
• Tickets
• Flowers
• Triangle
• Istanbul
• Brackets
• T-shirts
• Dijkstra

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

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

Лимит времени 1000/1000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

Problem description

Knight stays at the top left corner of the N*M chess board. This knight can move only in two ways: 2 cells to the right and 1 down, or 1 cell to the right and 2 down. How many different routes are there to reach right bottom cell of the board?

Input

Line 1: Two integers: N, M(1 <= N, M <= 50).

Output

Single integer, number of routes.

Example

stdin stdout

4 4

2

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

www.contester.ru