Problem: 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 ≤ maxn) — the size of the set. The second line contains n distinct integers a1, a2, ..., an (1 ≤ ai ≤ maxa) — 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 = maxn, take random distinct ai from 1 to maxa, 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 a1, a2, ..., an. Let x = an / 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 = an / g (without subtracting n).

The second wrong solution calculates x as x = an - n (without dividing by g).

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

Given maxn, maxa and q, find the number of interesting test cases satisfying the constraints, and output it modulo q.

Input

The only line contains three integers maxn, maxa and q (1 ≤ maxn ≤ 30 000; maxn ≤ maxa ≤ 109; 104 ≤ q ≤ 105 + 129).

Output

Output a single integer — the number of test cases which satisfy the constraints and make both wrong solutions output an incorrect answer, modulo q.

Examples

Input

3 6 100000


Output

4


Input

6 21 100129


Output

154


Input

58 787788 50216


Output

46009

Note

In the first example, interesting test cases look as follows: 
    
    
      
    1              1              1              3  
    2              4              6              2 4 6  
    

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1);
const int N = 65600;
complex<long double> oddc[N], evenc[N];
long long odd[N], even[N];
int Odd[N], Even[N];
int R[N], n, C = 1, mo, ans;
void FFT(complex<long double> *a, int f) {
  for (int i = (int)(0); i <= (int)(C - 1); i++)
    if (i < R[i]) swap(a[i], a[R[i]]);
  for (int d = 1; d < C; d <<= 1) {
    complex<long double> wn(cos(pi / d), f * sin(pi / d));
    for (int i = 0; i < C; i += (d << 1)) {
      complex<long double> w(1, 0);
      for (int j = i; j < i + d; j++, w *= wn) {
        complex<long double> y = a[j + d] * w;
        a[j + d] = a[j] - y;
        a[j] += y;
      }
    }
  }
}
void dtoc(long long *d, complex<long double> *c) {
  for (int i = (int)(0); i <= (int)(C - 1); i++) c[i] = (complex<long double>)0;
  for (int i = (int)(0); i <= (int)(n); i++) c[i] = d[i];
  FFT(c, 1);
}
void ctod(complex<long double> *c, long long *d) {
  FFT(c, -1);
  for (int i = (int)(0); i <= (int)(C - 1); i++) c[i] /= C;
  for (int i = (int)(0); i <= (int)(n); i++)
    d[i] = (long long)(c[i].real() + 0.5);
}
void updans() {
  for (int i = 1; i <= n; i += 2) ans = (ans + odd[i]) % mo;
}
void solve(int mx) {
  if (mx == 1) {
    even[0] = 1;
    odd[0] = 0;
    odd[1] = 1;
    updans();
    return;
  }
  solve(mx / 2);
  for (int i = (int)(0); i <= (int)(n); i++) Odd[i] = odd[i];
  for (int i = (int)(0); i <= (int)(n); i++) Even[i] = even[i];
  dtoc(odd, oddc);
  dtoc(even, evenc);
  for (int i = (int)(0); i <= (int)(C - 1); i++) {
    complex<long double> v1 = (oddc[i] + evenc[i]) * oddc[i];
    complex<long double> v2 =
        (oddc[i] + evenc[i]) * (evenc[i] - (complex<long double>)1);
    if (!(mx & 2))
      oddc[i] = v1, evenc[i] = v2;
    else
      evenc[i] = v1, oddc[i] = v2;
  }
  ctod(oddc, odd);
  ctod(evenc, even);
  for (int i = (int)(n + 1); i <= (int)(2 * n); i++) odd[i] = even[i] = 0;
  for (int i = (int)(0); i <= (int)(n); i++) {
    odd[i] = (odd[i] + Odd[i]) % mo;
    even[i] = (even[i] + Even[i]) % mo;
  }
  if (mx & 1)
    for (int i = (int)(n); i >= (int)(1); i--)
      odd[i] = (odd[i] + odd[i - 1] + even[i - 1]) % mo;
  updans();
}
int main() {
  int mx, L = 0;
  scanf("%d%d%d", &n, &mx, &mo);
  if (mx == 1) return puts("0"), 0;
  for (; C <= 2 * n; C <<= 1, L++)
    ;
  for (int i = (int)(1); i <= (int)(C - 1); i++)
    R[i] = (R[i >> 1] >> 1) | ((i & 1) << (L - 1));
  solve(mx / 2);
  printf("%d\n", ans);
}