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;
int mo;
struct COMPLEX {
  long double r, i;
  COMPLEX() {}
  COMPLEX(long double _r, long double _i) { r = _r, i = _i; }
  COMPLEX operator+(const COMPLEX &a) const {
    return COMPLEX(r + a.r, i + a.i);
  }
  COMPLEX operator-(const COMPLEX &a) const {
    return COMPLEX(r - a.r, i - a.i);
  }
  COMPLEX operator*(const COMPLEX &a) const {
    return COMPLEX(r * a.r - i * a.i, r * a.i + i * a.r);
  }
  COMPLEX conj() const { return COMPLEX(r, -i); }
};
const int FFTN = 1 << 16;
COMPLEX w[FFTN + 2], a[FFTN + 2], b[FFTN + 2];
int R[FFTN], LEN;
const long double pi = acos(-1);
void prepare() {
  for (int i = (int)(0); i <= (int)(FFTN - 1); i++)
    w[i] = COMPLEX(cos(2 * pi * i / FFTN), sin(2 * pi * i / FFTN));
}
void FFTinit(int sz) {
  LEN = 1;
  int L = 0;
  for (; LEN <= sz; LEN <<= 1, L++)
    ;
  for (int i = (int)(0); i <= (int)(LEN - 1); i++)
    R[i] = (R[i >> 1] >> 1) | ((i & 1) << (L - 1));
}
void DFT(COMPLEX *a, int n) {
  for (int i = (int)(0); i <= (int)(n - 1); i++)
    if (i < R[i]) swap(a[i], a[R[i]]);
  for (int d = 1; d < n; d <<= 1) {
    int len = FFTN / (d << 1);
    for (int i = 0; i < n; i += d << 1)
      for (int j = i, p = 0; j < i + d; j++, p += len)
        a[j + d] = a[j] - a[j + d] * w[p], a[j] = a[j] + a[j] - a[j + d];
  }
}
const int N = 30005;
int f[2][N], n, ans, mxv;
void solve(int mx) {
  if (mx == 1) {
    f[0][0] = f[1][1] = ans = 1;
    return;
  }
  solve(mx / 2);
  for (int i = (int)(0); i <= (int)(LEN - 1); i++)
    a[i] = (i <= n ? COMPLEX(f[0][i], f[1][i]) : COMPLEX(0, 0));
  DFT(a, LEN);
  for (int i = (int)(0); i <= (int)(LEN - 1); i++) {
    int ano = (LEN - i) & (LEN - 1);
    COMPLEX v0 = (a[i] + a[ano].conj()) * COMPLEX(0.5, 0);
    COMPLEX v1 = (a[i] - a[ano].conj()) * COMPLEX(0, -0.5);
    b[ano] = (v0 + v1) * v1 + (v0 + v1) * (v0 - COMPLEX(1, 0)) * COMPLEX(0, 1);
  }
  DFT(b, LEN);
  for (int i = (int)(0); i <= (int)(n); i++) {
    int v1 = (long long)(b[i].r / LEN + 0.49) % mo;
    int v0 = (long long)(b[i].i / LEN + 0.49) % mo;
    if (mx & 2) swap(v0, v1);
    f[0][i] = (f[0][i] + v0) % mo;
    f[1][i] = (f[1][i] + v1) % mo;
  }
  if (mx & 1)
    for (int i = (int)(n); i >= (int)(1); i--)
      f[1][i] = (f[1][i] + f[1][i - 1] + 1ll * f[0][i - 1]) % mo;
  for (int i = 1; i <= n; i += 2) ans = (ans + f[1][i]) % mo;
}
int main() {
  scanf("%d%d%d", &n, &mxv, &mo);
  if (mxv == 1) return puts("0"), 0;
  prepare();
  FFTinit(2 * n);
  solve(mxv / 2);
  printf("%d\n", ans);
}