A correct parentheses sequence can be defined recursively as follows:
Each correct parentheses sequence can be derived using the above rules.
For a parentheses sequence, you can make some operations with it.
(' in the specified range changes to a ')' and vice versa.The value of a parentheses sequence is the minimal number of the operations required to change it into a correct parentheses sequence. If it is impossible, the value of the sequence is equal to 10100.
For example, the value of "()((" is 1, the value of "()()" is 0, and the value of "(((" is 10100.
You are given an integer n. For each 1≤i≤n, find the number A_i of different parentheses sequence of length n which has value i, and then calculate the sum ∑_i=0n((i+1)⋅A_i).
The answer may be very large, so print it modulo the given integer m.
The first line of the input contains two integers n and m (1≤n≤106, 1≤m≤109).
Print one integer: the answer to the problem.