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;
template <class T>
inline void gn(T &x) {
  char c;
  while (!isdigit(c = getchar()))
    ;
  x = c - '0';
  while (isdigit(c = getchar())) x = x * 10 + c - '0';
}
const int N = (1 << 16) + 5;
const long double pi = acos(-1);
int n, m, mo, k, l, res, rev[N], x[N], y[N], f[N], g[N], z[N];
struct ex {
  long double x, y;
  ex(long double _x = 0, long double _y = 0) { x = _x, y = _y; }
  ex operator+(const ex &b) const { return ex(x + b.x, y + b.y); }
  ex operator-(const ex &b) const { return ex(x - b.x, y - b.y); }
  ex operator*(const ex &b) const {
    return ex(x * b.x - y * b.y, x * b.y + y * b.x);
  }
  ex operator/(const int &b) const { return ex(x / b, y / b); }
} a[N];
inline void pre() {
  for (int i = 1; i <= k - 1; ++i)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << l - 1);
}
inline void FFT(ex *x, int ty) {
  for (int i = 0; i <= k - 1; ++i)
    if (i < rev[i]) swap(x[i], x[rev[i]]);
  for (int i = 1; i < k; i <<= 1) {
    ex wn(cos(pi / i), ty * sin(pi / i));
    for (int j = 0; j < k; j += (i << 1)) {
      ex w(1, 0);
      for (int o = j, p = j + i, q = j + i; o < q; ++o, ++p, w = w * wn) {
        ex X = x[o], Y = w * x[p];
        x[o] = X + Y, x[p] = X - Y;
      }
    }
  }
  if (ty == -1)
    for (int i = 0; i <= k - 1; ++i) x[i] = x[i] / k;
}
inline void mul(int *A, int *B, int *C) {
  for (int i = 0; i <= k - 1; ++i) a[i].x = A[i] + B[i], a[i].y = A[i] - B[i];
  FFT(a, 1);
  for (int i = 0; i <= k - 1; ++i) a[i] = a[i] * a[i];
  FFT(a, -1);
  for (int i = 0; i <= k - 1; ++i) C[i] = (long long)(a[i].x / 4 + 0.06) % mo;
}
inline void cha(int &a) {
  if (a >= mo) a -= mo;
}
inline void chd(int &a) {
  if (a < 0) a += mo;
}
void solve(int m) {
  if (m == 1) {
    f[0] = g[1] = res = 1;
    return;
  }
  solve(m >> 1);
  for (int i = 0; i <= n; ++i)
    x[i] = f[i], y[i] = g[i], cha(z[i] = f[i] + g[i]);
  if (m >> 1 & 1) {
    mul(z, y, f);
    mul(z, x, g);
    for (int i = 0; i <= n; ++i) chd(g[i] -= z[i]);
  } else {
    mul(z, x, f);
    mul(z, y, g);
    for (int i = 0; i <= n; ++i) chd(f[i] -= z[i]);
  }
  for (int i = 0; i <= n; ++i) cha(f[i] += x[i]), cha(g[i] += y[i]);
  if (m & 1)
    for (int i = n; i >= 1; --i) cha(g[i] += f[i - 1]), cha(g[i] += g[i - 1]);
  for (int i = 0; i <= (n - 1) >> 1; ++i) cha(res += g[i + i + 1]);
}
int main() {
  gn(n), gn(m), gn(mo);
  m >>= 1;
  if (!m) return puts("0"), 0;
  for (k = 1; k <= (n + 1 << 1); k <<= 1) ++l;
  pre();
  solve(m);
  return printf("%d\n", res), 0;
}