Carol wants to win Cactus' heart, so she has planned a magnificent trip to the land of Cartesia together. Unfortunately, Cactus is not very interested in the modern art and hiking trails, nor Cartesia's mystical scripture of calculating time complexity. He is more preoccupied with solving an abstract algorithm problem. Carol decides to solve the following problem for him.
A contiguous subsequence of an array is a sequence of numbers at indices
Cactus would like to know the number of permutations of the elements
Constraints
Subtask 1 [7/15]
Subtask 2 [8/15]
No additional constraints.
Input Specification
The first line will contain
Output Specification
Output the number of permutations of the elements
Sample Input 1
5 3
Sample Output 1
41
Sample Input 2
10 8
Sample Output 2
231
Sample Input 3
1 1
Sample Output 3
1
Comments