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;
inline int read() {
  int s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
const long double pi = acos(-1);
struct cp {
  long double r, i;
  cp operator+(const cp& x) const { return (cp){x.r + r, x.i + i}; }
  cp operator-(const cp& x) const { return (cp){r - x.r, i - x.i}; }
  cp operator*(const cp& x) const {
    return (cp){r * x.r - i * x.i, r * x.i + i * x.r};
  }
} A[600003], B[600003];
int rev[6000003], N = 1;
void init() {
  int d = N >> 1;
  rev[0] = 0, rev[1] = N >> 1;
  for (int i = 2; i < N; i <<= 1) {
    d >>= 1;
    for (int j = 0; j < i; ++j) rev[i + j] = rev[j] | d;
  }
  return;
}
void FFT(cp* F, int op) {
  for (int i = 0; i < N; ++i)
    if (rev[i] > i) swap(F[i], F[rev[i]]);
  for (int len = 2, M = 1; len <= N; len <<= 1, M <<= 1) {
    cp w = (cp){cos(pi / M * op), sin(pi / M * op)};
    for (int l = 0, r = len - 1; l < N; l += len, r += len) {
      cp w0 = (cp){1, 0};
      for (int i = l; i < l + M; ++i) {
        cp x = F[i], y = w0 * F[i + M];
        F[i] = x + y, F[i + M] = x - y, w0 = w0 * w;
      }
    }
  }
}
signed MTT(int n, int p, long long* F, long long* G, long long* ans) {
  N = 1;
  for (; N <= (n << 1); N <<= 1)
    ;
  for (int i = 0; i < N; ++i) A[i] = B[i] = (cp){0.0, 0.0};
  for (int i = 0; i <= n; ++i) A[i].r = F[i];
  for (int i = 0; i <= n; ++i) B[i].r = G[i];
  init();
  FFT(A, 1), FFT(B, 1);
  for (int i = 0; i < N; ++i) A[i] = A[i] * B[i];
  FFT(A, -1);
  for (int i = 0; i <= n; ++i) ans[i] = (long long)(A[i].r / N + 0.5);
  return 0;
}
long long F[30003], G[30003], sum[30003];
long long tf[30003], tg[30003];
signed main() {
  int N = read(), A = read() >> 1, p = read();
  long long ans = 0;
  for (int i = 0; i <= N; ++i) F[i] = G[i] = 0;
  F[0] = 1;
  int M = 1;
  for (; (M << 1) <= A; M <<= 1) M <<= 1;
  for (int cur = 0; M; M >>= 1) {
    if (cur) {
      for (int i = 0; i <= N; ++i) sum[i] = (F[i] + G[i]) % p;
      F[0] = 0;
      MTT(N, p, sum, F, tg), MTT(N, p, sum, G, tf);
      F[0] = 1;
      for (int i = 0; i <= N; ++i) F[i] = (F[i] + tf[i]) % p;
      for (int i = 0; i <= N; ++i) G[i] = (G[i] + tg[i]) % p;
    } else {
      for (int i = 0; i <= N; ++i) sum[i] = (F[i] + G[i]) % p;
      F[0] = 0;
      MTT(N, p, sum, F, tf), MTT(N, p, sum, G, tg);
      F[0] = 1;
      for (int i = 0; i <= N; ++i) F[i] = (F[i] + tf[i]) % p;
      for (int i = 0; i <= N; ++i) G[i] = (G[i] + tg[i]) % p;
    }
    cur = 0;
    if (M & A) {
      for (int i = N; i >= 1; --i) F[i] = (F[i] + F[i - 1] + G[i - 1]) % p;
      cur = 1;
    }
    for (int i = 1; i <= N; i += 2) ans = (ans + F[i]) % p;
  }
  printf("%lld\n", ans);
  return 0;
}