Олимпиадный тренинг

Задача 22015. number of ways


Задача

Темы:
In a rectangular NxM table, the player is in the top left cell at the beginning.
In one move, he is allowed to move to the next cell 
either right or down (left and up are not allowed).
Count how many ways the player has to hit the right one
bottom cell.
 
Input data
The input file contains two numbers N and M - the sizes of the table (1<=N<=10,
1<=M<=10).
 
Output
Write the desired number of ways to the output file. 
 
Note
Under these restrictions, the number of ways is included in the Longint type.
 
Sample input file
2 3
 
Sample Output
3
 
Explanation
If we have a table with 2 rows and 3 columns, then there are the following 
ways to get from top left to bottom right:
1) down, right, right
2) right, down, right
3) right, right, down
 
Another input file example
3 3
 
Sample Output
6