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 = 2e5 + 5;
int n, a, P, len, rev[N];
int Lim;
int f[2][N], g[2][N];
const long double PI = acos(-1.0);
struct Complex {
  long double x, y;
  Complex() {}
  Complex(long double _x, long double _y) {
    x = _x;
    y = _y;
  }
  Complex conj() { return Complex(x, -y); }
  Complex operator+(const Complex rhs) const {
    return Complex(x + rhs.x, y + rhs.y);
  }
  Complex operator-(const Complex rhs) const {
    return Complex(x - rhs.x, y - rhs.y);
  }
  Complex operator*(const Complex rhs) const {
    return Complex(x * rhs.x - y * rhs.y, x * rhs.y + y * rhs.x);
  }
} w[N], w2[N];
inline void FFT(Complex *F, int len, int type) {
  for (int i = 0; i < len; i++)
    if (i < rev[i]) swap(F[i], F[rev[i]]);
  for (int k = 2; k <= len; k <<= 1)
    for (int j = 0; j < len; j += k) {
      for (int i = j; i < j + (k / 2); i++) {
        Complex cur = type == 1 ? w[(k / 2) + (i - j)] : w2[(k / 2) + (i - j)];
        Complex u = F[i], v = cur * F[i + (k / 2)];
        F[i] = u + v;
        F[i + (k / 2)] = u - v;
      }
    }
  if (type == -1)
    for (int i = 0; i < len; i++) F[i].x /= len, F[i].y /= len;
}
Complex A[N], B[N], C[N], D[N];
inline void MTT(int *F, int *G, int k) {
  for (int i = 0; i < len; i++) A[i] = B[i] = C[i] = D[i] = Complex(0, 0);
  Lim = int(sqrt(P) + 1);
  for (int i = 0; i < k; i++) {
    A[i] = Complex(F[i] / Lim, F[i] % Lim);
    C[i] = Complex(G[i] / Lim, G[i] % Lim);
  }
  FFT(A, len, 1);
  FFT(C, len, 1);
  for (int i = 1; i < len; i++) B[len - i] = A[i].conj();
  B[0] = A[0].conj();
  for (int i = 1; i < len; i++) D[len - i] = C[i].conj();
  D[0] = C[0].conj();
  for (int i = 0; i < len; i++) {
    Complex aa = (A[i] + B[i]) * Complex(0.5, 0),
            bb = (A[i] - B[i]) * Complex(0, -0.5),
            cc = (C[i] + D[i]) * Complex(0.5, 0),
            dd = (C[i] - D[i]) * Complex(0, -0.5);
    A[i] = (aa * cc) + Complex(0, 1) * (aa * dd + bb * cc), B[i] = bb * dd;
  }
  FFT(A, len, -1);
  FFT(B, len, -1);
  for (int i = 0; i < k; i++) {
    long long aa = (long long)(A[i].x + 0.5) % P,
              bb = (long long)(A[i].y + 0.5) % P,
              cc = (long long)(B[i].x + 0.5) % P;
    F[i] = (1ll * aa * Lim * Lim % P + 1ll * bb * Lim % P + cc % P) % P;
    F[i] = (F[i] + P) % P;
  }
}
int ans = 0;
inline void solve(int a, int k) {
  if (a == 1) {
    f[1][1] = ans = 1;
    return;
  }
  solve(a >> 1, k);
  memset(g, 0, sizeof g);
  g[0][0] = g[1][0] = 1;
  for (int i = 1; i < k; i++) g[0][i] = g[1][i] = (f[0][i] + f[1][i]) % P;
  MTT(g[0], f[(a >> 1) & 1], k);
  MTT(g[1], f[((a >> 1) & 1) ^ 1], k);
  for (int i = 0; i < k; i++)
    f[0][i] = (f[0][i] + g[0][i]) % P, f[1][i] = (f[1][i] + g[1][i]) % P;
  if (a & 1) {
    for (int i = k - 1; i; i--)
      f[1][i] = (f[1][i] + f[0][i - 1] + f[1][i - 1]) % P;
    f[1][1] = (f[1][1] + 1) % P;
  }
  for (int i = 1; i < k; i += 2) ans = (ans + f[1][i]) % P;
}
int main() {
  scanf("%d%d%d", &n, &a, &P);
  if (a == 1) return puts("0"), 0;
  len = 1;
  while (len <= n * 2) len <<= 1;
  for (int i = 0; i < len; i++) {
    rev[i] = rev[i >> 1] >> 1;
    if (i & 1) rev[i] |= len >> 1;
  }
  for (int i = 1; i < len; i <<= 1) {
    w[i] = Complex(1, 0);
    for (int j = 1; j < i; j++)
      w[i + j] = (((j & 31) == 1) ? Complex(cos(PI * j / i), sin(PI * j / i))
                                  : w[i + j - 1] * w[i + 1]);
  }
  for (int i = 0; i < len; i++) w2[i] = w[i].conj();
  solve(a >> 1, n + 1);
  printf("%d\n", ans);
}