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 int N = 1e5 + 10;
const long double PI = acos(-1.0);
struct cccccc {
  long double real, imag;
  cccccc() {}
  cccccc(long double real_, long double imag_) : real(real_), imag(imag_) {}
  friend inline cccccc operator+(const cccccc &lhs, const cccccc &rhs) {
    return cccccc(lhs.real + rhs.real, lhs.imag + rhs.imag);
  }
  friend inline cccccc operator-(const cccccc &lhs, const cccccc &rhs) {
    return cccccc(lhs.real - rhs.real, lhs.imag - rhs.imag);
  }
  friend inline cccccc operator*(const cccccc &lhs, const cccccc &rhs) {
    return cccccc(lhs.real * rhs.real - lhs.imag * rhs.imag,
                  lhs.real * rhs.imag + lhs.imag * rhs.real);
  }
};
inline cccccc conj(cccccc &a) { return cccccc(a.real, -a.imag); }
int n, m, mod, ans;
inline void FFT(cccccc *a, int n, int rev) {
  for (int i = 0, j = 0; i < n; ++i) {
    if (i > j) swap(a[i], a[j]);
    for (int k = n >> 1; (j ^= k) < k; k >>= 1)
      ;
  }
  for (int i = 2; i <= n; i <<= 1) {
    int m = i >> 1;
    cccccc g(cos(PI / m), rev * sin(PI / m));
    for (int j = 0; j < n; j += i) {
      cccccc w(1, 0);
      for (int k = 0; k != m; k++) {
        cccccc z = a[j + m + k] * w;
        a[j + m + k] = a[j + k] - z;
        a[j + k] = a[j + k] + z;
        w = w * g;
      }
    }
  }
  if (rev == -1) {
    for (int i = 0; i < n; i++) a[i].real /= n, a[i].imag /= n;
  }
}
cccccc A[N], B[N], f1[N], f2[N], f3[N], f4[N];
void cal(int *a, int *b, int *c, int len) {
  for (int i = 0; i < len; i++) A[i] = cccccc(b[i] & 32767, b[i] >> 15);
  for (int i = 0; i < len; i++) B[i] = cccccc(c[i] & 32767, c[i] >> 15);
  FFT(A, len, 1);
  FFT(B, len, 1);
  for (int i = 0; i < len; i++) {
    int j = (len - i) & (len - 1);
    f2[i] = (A[i] + conj(A[j])) * cccccc(0.5, 0);
    f1[i] = (A[i] - conj(A[j])) * cccccc(0, -0.5);
    f4[i] = (B[i] + conj(B[j])) * cccccc(0.5, 0);
    f3[i] = (B[i] - conj(B[j])) * cccccc(0, -0.5);
  }
  for (int i = 0; i < len; i++) {
    A[i] = f1[i] * f3[i] + f1[i] * f4[i] * cccccc(0, 1);
    B[i] = f2[i] * f4[i] * cccccc(0, 1) + f2[i] * f3[i];
  }
  FFT(A, len, -1);
  FFT(B, len, -1);
  for (int i = 0; i < len; i++) {
    long long g1 = (long long)(A[i].real + 0.5) % mod;
    long long g2 = (long long)(A[i].imag + 0.5) % mod;
    long long g3 = (long long)(B[i].real + 0.5) % mod;
    long long g4 = (long long)(B[i].imag + 0.5) % mod;
    a[i] = (g4 + (g2 + g3 << 15) + (g1 << 30)) % mod;
  }
}
int pre[2][N], nxt[2][N], a[N], b[N], c[N];
void work(int m) {
  if (m == 1) {
    ans = 1;
    pre[1][1] = 1;
    pre[0][1] = 0;
    return;
  }
  work(m / 2);
  if (m & 1) {
    int len = 1;
    while (len <= min(n * 2, m)) len <<= 1;
    for (int i = 0; i < len; i++) b[i] = c[i] = 0;
    for (int i = 1; i <= min(n, m / 2); i++)
      b[i] = (pre[0][i] + pre[1][i]) % mod;
    c[1]++;
    for (int i = 1; i <= min(n, m / 2); i++)
      (c[i] += pre[1 - (m / 2) % 2][i]) %= mod,
          (c[i + 1] += (pre[1][i] + pre[0][i])) %= mod;
    cal(a, b, c, len);
    for (int i = 1; i <= min(n, m); i++) {
      nxt[1][i] = a[i];
      if (i <= min(n, m / 2))
        (nxt[1][i] += pre[1][i] + pre[1 - (m / 2) % 2][i]) %= mod;
    }
    for (int i = 1; i <= min(n, m / 2); i++)
      (nxt[1][i + 1] += pre[1][i] + pre[0][i]) %= mod;
    nxt[1][1]++;
    for (int i = 0; i < len; i++) b[i] = c[i] = 0;
    for (int i = 1; i <= min(n, m / 2); i++)
      b[i] = (pre[0][i] + pre[1][i]) % mod;
    for (int i = 1; i <= min(n, m / 2); i++) c[i] = pre[(m / 2) % 2][i];
    cal(a, b, c, len);
    for (int i = 1; i <= min(n, m); i++) {
      nxt[0][i] = a[i];
      if (i <= min(n, m / 2))
        (nxt[0][i] += pre[0][i] + pre[(m / 2) % 2][i]) %= mod;
    }
  } else {
    int len = 1;
    while (len <= min(n * 2, m)) len <<= 1;
    for (int i = 0; i < len; i++) b[i] = c[i] = 0;
    for (int i = 1; i <= min(n, m / 2); i++)
      b[i] = (pre[0][i] + pre[1][i]) % mod;
    for (int i = 1; i <= min(n, m / 2); i++) c[i] = pre[1 - (m / 2) % 2][i];
    cal(a, b, c, len);
    for (int i = 1; i <= min(n, m); i++) {
      nxt[1][i] = a[i];
      if (i <= min(n, m / 2))
        (nxt[1][i] += pre[1][i] + pre[1 - (m / 2) % 2][i]) %= mod;
    }
    for (int i = 0; i < len; i++) b[i] = c[i] = 0;
    for (int i = 1; i <= min(n, m / 2); i++)
      b[i] = (pre[0][i] + pre[1][i]) % mod;
    for (int i = 1; i <= min(n, m / 2); i++) c[i] = pre[(m / 2) % 2][i];
    cal(a, b, c, len);
    for (int i = 1; i <= min(n, m); i++) {
      nxt[0][i] = a[i];
      if (i <= min(n, m / 2))
        (nxt[0][i] += pre[0][i] + pre[(m / 2) % 2][i]) %= mod;
    }
  }
  for (int i = 1; i <= min(n, m); i++) {
    pre[0][i] = nxt[0][i];
    pre[1][i] = nxt[1][i];
    if (i & 1) ans += nxt[1][i];
    if (ans >= mod) ans -= mod;
  }
}
int main() {
  scanf("%d %d %d", &n, &m, &mod);
  m /= 2;
  if (m == 0) return puts("0");
  work(m);
  cout << ans;
}