HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > C. T. 2011 > problem:


Chess

Volume problems

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

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 1000/1000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

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