#abc156e. [abc156_e]Roaming
[abc156_e]Roaming
Problem Statement
There is a building with rooms, numbered to .
We can move from any room to any other room in the building.
Let us call the following event a move: a person in some room goes to another room .
Initially, there was one person in each room in the building.
After that, we know that there were exactly moves happened up to now.
We are interested in the number of people in each of the rooms now. How many combinations of numbers of people in the rooms are possible?
Find the count modulo .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the number of possible combinations of numbers of people in the rooms now, modulo .
Sample Input 1
3 2
Sample Output 1
10
Let , , and be the number of people in Room , , and now, respectively. There are possible combination of :
For example, will be if the person in Room goes to Room and then one of the persons in Room goes to Room .
Sample Input 2
200000 1000000000
Sample Output 2
607923868
Print the count modulo .
Sample Input 3
15 6
Sample Output 3
22583772