Test data generation is not an easy task! Often, generating big random test cases is not enough to ensure thorough testing of solutions for correctness.

For example, consider a problem from an old Codeforces round. Its input format looks roughly as follows:

The first line contains a single integer *n* (1 ≤ *n* ≤ *max*<sub class="lower-index">*n*</sub>) — the size of the set. The second line contains *n* distinct integers *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub> (1 ≤ *a*<sub class="lower-index">*i*</sub> ≤ *max*<sub class="lower-index">*a*</sub>) — the elements of the set in increasing order.

If you don't pay attention to the problem solution, it looks fairly easy to generate a good test case for this problem. Let *n* = *max*<sub class="lower-index">*n*</sub>, take random distinct *a*<sub class="lower-index">*i*</sub> from 1 to *max*<sub class="lower-index">*a*</sub>, sort them... Soon you understand that it's not that easy.

Here is the actual problem solution. Let *g* be the greatest common divisor of *a*<sub class="lower-index">1</sub>, *a*<sub class="lower-index">2</sub>, ..., *a*<sub class="lower-index">*n*</sub>. Let *x* = *a*<sub class="lower-index">*n*</sub> / *g* - *n*. Then the correct solution outputs "Alice" if *x* is odd, and "Bob" if *x* is even.

Consider two wrong solutions to this problem which differ from the correct one only in the formula for calculating *x*.

The first wrong solution calculates *x* as *x* = *a*<sub class="lower-index">*n*</sub> / *g* (without subtracting *n*).

The second wrong solution calculates *x* as *x* = *a*<sub class="lower-index">*n*</sub> - *n* (without dividing by *g*).

A test case is interesting if it makes both wrong solutions output an incorrect answer.

Given *max*<sub class="lower-index">*n*</sub>, *max*<sub class="lower-index">*a*</sub> and *q*, find the number of interesting test cases satisfying the constraints, and output it modulo *q*.
The only line contains three integers *max*<sub class="lower-index">*n*</sub>, *max*<sub class="lower-index">*a*</sub> and *q* (1 ≤ *max*<sub class="lower-index">*n*</sub> ≤ 30 000; *max*<sub class="lower-index">*n*</sub> ≤ *max*<sub class="lower-index">*a*</sub> ≤ 10<sup class="upper-index">9</sup>; 10<sup class="upper-index">4</sup> ≤ *q* ≤ 10<sup class="upper-index">5</sup> + 129).
In the first example, interesting test cases look as follows:
print("_RANDOM_GUESS_1689596981.545868")# 1689596981.5458884