Counting Paths


Submit solution

Points: 6 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem types

Turtle is in an \(N \times M\) grid and is currently on \((1,1)\). He wants to get to \((N,M)\) but can only move down and right.
How many distinct paths are there to get to his destination?

Input Specification

The first and only line contains two space-separated integers: \(N\) and \(M\) (\(1 \le N, M \le 1000\))

Output Specification

Print the number of disinct paths mod \(10^9+7\)

Sample Input

3 5

Sample Output

15

Comments

There are no comments at the moment.