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 std::cerr;
using std::endl;
const int N = 3e4 * 4 + 233;
int maxn, maxa, P;
int F[2][N], G[2][N];
inline int add(int x, int y) {
  x += y, (x >= P) ? (x -= P) : 0;
  return x;
}
inline int mul(int x, int y) { return 1ll * x * y % P; }
struct comp {
  double x, y;
  inline friend comp operator+(comp a, comp b) {
    return {a.x + b.x, a.y + b.y};
  }
  inline friend comp operator-(comp a, comp b) {
    return {a.x - b.x, a.y - b.y};
  }
  inline friend comp operator*(comp a, comp b) {
    return {a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x};
  }
  inline friend comp operator/(comp a, double b) { return {a.x / b, a.y / b}; }
};
const double PI = std::acos(-1);
int lim, L, rev[N];
comp w[N];
inline void init(int n) {
  lim = 1, L = 0;
  while (lim < n) lim <<= 1, ++L;
  for (int i = 0; i < lim; ++i)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (L - 1));
  int qwq = lim >> 1;
  for (int i = qwq, j = 0; i < lim; ++i, ++j)
    w[i] = {std::cos(PI * 2 * j / lim), std::sin(PI * 2 * j / lim)};
  for (int i = qwq - 1; i; --i) w[i] = w[i << 1];
}
inline void DFT(comp f[], int o) {
  for (int i = 0; i < lim; ++i)
    if (i < rev[i]) std::swap(f[i], f[rev[i]]);
  for (int i = 1; i < lim; i <<= 1) {
    for (int j = 0; j < lim; j += i << 1) {
      auto a = f + j, b = f + i + j, p = w + i;
      for (int k = 0; k < i; ++k) {
        auto ny = b[k] * p[k];
        b[k] = a[k] - ny;
        a[k] = a[k] + ny;
      }
    }
  }
  if (o == -1) {
    std::reverse(f + 1, f + lim);
    for (int i = 0; i < lim; ++i) f[i] = f[i] / lim;
  }
}
comp pA[N], pB[N];
inline void poly_mul(int A[], int B[]) {
  for (int i = 0; i < lim; ++i)
    pA[i].x = A[i], pB[i].x = B[i], pA[i].y = pB[i].y = 0;
  DFT(pA, 1), DFT(pB, 1);
  for (int i = 0; i < lim; ++i) pA[i] = pA[i] * pB[i];
  DFT(pA, -1);
  for (int i = 0; i <= maxn; ++i) A[i] = (long long)(pA[i].x + 0.5) % P;
}
std::set<int> key;
int ans;
void solve(int n) {
  if (n == 0) return;
  if (n & 1) {
    solve(n - 1);
    for (int i = 0; i <= maxn; ++i) F[0][i] = G[0][i], F[1][i] = G[1][i];
    int k = n & 1;
    for (int i = 1; i <= maxn; ++i)
      F[k][i] = add(F[k][i], add(G[0][i - 1], G[1][i - 1]));
    F[k][1] += 1;
  } else {
    solve(n >> 1);
    for (int k = 0; k < 2; ++k) {
      for (int i = 0; i <= maxn; ++i) F[k][i] = add(G[0][i], G[1][i]);
      F[k][0] += 1;
      poly_mul(F[k], G[k ^ ((n >> 1) & 1)]);
      for (int i = 0; i <= maxn; ++i) F[k][i] = add(F[k][i], G[k][i]);
    }
  }
  if (key.count(n)) {
    for (int i = 1; i <= maxn; i += 2) {
      ans = add(ans, F[1][i]);
    }
  }
  std::swap(F, G);
  memset(F, 0, sizeof(F));
}
int A[N], B[N];
int main() {
  scanf("%d%d%d", &maxn, &maxa, &P);
  for (int i = maxa / 2; i; i >>= 1) key.insert(i);
  init((maxn + 1) << 1);
  solve(maxa / 2);
  printf("%d\n", ans);
  return 0;
}