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;
long long read() {
  long long x = 0, f = 0;
  char ch = getchar();
  while (!isdigit(ch)) f = ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  return f ? -x : x;
}
const int N = 1 << 16;
int n, m, mod;
int Pow(int x, int y) {
  int ans = 1;
  for (; y; y >>= 1, x = (long long)x * x % mod)
    if (y & 1) ans = (long long)ans * x % mod;
  return ans;
}
void Add(int &x, int y) {
  if ((x += y) >= mod) x -= mod;
}
void Del(int &x, int y) {
  if ((x -= y) < 0) x += mod;
}
int Add(int x) { return x >= mod ? x - mod : x; }
int Del(int x) { return x < 0 ? x + mod : x; }
namespace fft {
const double pi = acos(-1.0);
struct cp {
  double r, i;
  cp() {}
  cp(double _r) { r = _r, i = 0; }
  cp(double _r, double _i) { r = _r, i = _i; }
  friend cp operator+(cp a, cp b) { return cp(a.r + b.r, a.i + b.i); }
  friend cp operator-(cp a, cp b) { return cp(a.r - b.r, a.i - b.i); }
  friend cp operator*(cp a, cp b) {
    return cp(a.r * b.r - a.i * b.i, a.r * b.i + a.i * b.r);
  }
} w[N], a0[N], a1[N], b0[N], b1[N], A[N], B[N], C[N];
int R[N];
void init(int n) {
  int d = 0;
  while (1 << d < n) d++;
  for (int i = (0); i <= (n - 1); i++) {
    R[i] = (R[i >> 1] >> 1) | ((i & 1) << (d - 1));
    w[i] = cp(cos(pi * 2 * i / n), sin(pi * 2 * i / n));
  }
}
void FFT(cp *a, int n, int flag) {
  for (int i = (0); i <= (n - 1); i++)
    if (i < R[i]) swap(a[i], a[R[i]]);
  for (int t = n >> 1, d = 1; d < n; d <<= 1, t >>= 1)
    for (int i = 0; i < n; i += d << 1)
      for (int j = 0; j < d; j++) {
        cp tmp = w[t * j] * a[i + j + d];
        a[i + j + d] = a[i + j] - tmp;
        a[i + j] = a[i + j] + tmp;
      }
  if (flag < 0) {
    reverse(a + 1, a + n);
    for (int i = (0); i <= (n - 1); i++) a[i].r /= n, a[i].i /= n;
  }
}
vector<int> Mul(vector<int> a, vector<int> b) {
  int n = 1, m = max(0, (int)a.size() + (int)b.size() - 1);
  while (n < m) n <<= 1;
  a.resize(n), b.resize(n);
  init(n);
  for (int i = (0); i <= (n - 1); i++) {
    a0[i] = cp(a[i] & 255);
    a1[i] = cp(a[i] >> 8);
    b0[i] = cp(b[i] & 255);
    b1[i] = cp(b[i] >> 8);
  }
  FFT(a0, n, 1), FFT(a1, n, 1), FFT(b0, n, 1), FFT(b1, n, 1);
  for (int i = (0); i <= (n - 1); i++) {
    A[i] = a1[i] * b1[i];
    B[i] = a1[i] * b0[i] + a0[i] * b1[i];
    C[i] = a0[i] * b0[i];
  };
  FFT(A, n, -1), FFT(B, n, -1), FFT(C, n, -1);
  for (int i = (0); i <= (n - 1); i++)
    a[i] = ((long long)(A[i].r + 0.5) * 65536 +
            (long long)(B[i].r + 0.5) * 256 + (long long)(C[i].r + 0.5)) %
           mod;
  a.resize(m);
  return a;
}
}  // namespace fft
vector<int> operator+(vector<int> a, vector<int> b) {
  int n = max(a.size(), b.size());
  a.resize(n), b.resize(n);
  for (int i = (0); i <= (n - 1); i++) Add(a[i], b[i]);
  return a;
}
vector<int> operator*(vector<int> a, vector<int> b) {
  a = fft::Mul(a, b);
  if ((int)a.size() > n) a.resize(n);
  return a;
}
int main() {
  n = read(), m = read(), mod = read();
  int ans = 0;
  vector<int> f(n), g0(n), g1(n);
  f[0] = 1;
  int v = 0;
  for (int d = (30); d >= (1); d--) {
    vector<int> ng0, ng1;
    if (v & 1)
      ng0 = g0 + f * g1, ng1 = g1 + f * g0;
    else
      ng0 = g0 + f * g0, ng1 = g1 + f * g1;
    f = f * f, g0 = ng0, g1 = ng1;
    v <<= 1;
    if (m >> d & 1) {
      g1 = g1 + f;
      if ((int)f.size() < n) f.push_back(0);
      for (int i = ((int)f.size() - 1); i >= (1); i--) Add(f[i], f[i - 1]);
      v++;
    }
    for (int i = (0); i <= ((int)g1.size() - 1); i++)
      if (~i & 1) Add(ans, g1[i]);
  }
  cout << ans << endl;
  return 0;
}