IOI Selection
One of the qualifying contests at the IOI will be held today. The contest hall is a row of computers. All computers are numbered with integers from to from left to right. There will be a total of participants numbered with integers from to .
We have an array of length , where is the computer that the -th participant wants to sit next to.
We also have another array of length , consisting of the characters "L" and "R". — this is the side from which the -th participant enters the hall. "L" means that the participant enters the hall to the left of the computer, and goes from left to right, and "R" means that the participant enters the hall to the right of the computer and goes from right to left.
Participants in the order from to enter the hall one by one. The -th of them enters the hall from the side of and goes to the computer . If this computer is already occupied, it continues to go in the same direction until the first computer is not occupied. After that, he sits down at this computer. If a participant does not meet any free computers, he gets upset and leaves the competition.
The frustration of the participant’s is the distance between his desired computer and the computer he eventually sat down at. The distance between computers and is .
The numbers in the array can be equal. There is possible array pairs .
Consider all pairs of arrays such that no participant will be upset. For each of them, we will calculate the sum of the frustrations of all participants. Find the sum of these numbers. The answer must be taken modulo .
Input
In a single line there will be two integers .
Output
Print a single integer — the required sum modulo .