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>
const int N = 3e4 + 10, L = 32;
const long long mod = 4179340454199820289;
int n, m, p, l, lim, len[L], rev[N << 2];
long long invlim, w[N << 2];
struct z {
  int x;
  z(int x = 0) : x(x) {}
  friend inline z operator*(z a, z b) { return (long long)a.x * b.x % p; }
  friend inline z operator-(z a, z b) {
    return (a.x -= b.x) < 0 ? a.x + p : a.x;
  }
  friend inline z operator+(z a, z b) {
    return (a.x += b.x) >= p ? a.x - p : a.x;
  }
} ans, tmp[2][N], f[L][2][N];
inline z fpow(z a, int b) {
  z s = 1;
  for (; b; b >>= 1, a = a * a)
    if (b & 1) s = s * a;
  return s;
}
inline long long fpow(long long a, long long b) {
  long long s = 1;
  for (; b; b >>= 1, a = (__int128)a * a % mod)
    if (b & 1) s = (__int128)s * a % mod;
  return s;
}
void init(int n) {
  int k = 0;
  lim = 1;
  while (lim <= (n << 1)) lim <<= 1, ++k;
  for (int i = 0; i < lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (k - 1));
  for (int len = 1; len < lim; len <<= 1) {
    long long wn = fpow(3ll, (mod - 1) / (len << 1));
    w[len] = 1;
    for (int i = 1; i < len; i++)
      w[i + len] = (__int128)w[i + len - 1] * wn % mod;
  }
  invlim = fpow((long long)lim, (mod - 2));
}
void dft(long long *a) {
  for (int i = 0; i < lim; i++)
    if (i < rev[i]) std::swap(a[i], a[rev[i]]);
  for (int len = 1; len < lim; len <<= 1)
    for (int i = 0; i < lim; i += (len << 1))
      for (int j = 0; j < len; j++) {
        long long x = a[i + j], y = (__int128)a[i + j + len] * w[j + len] % mod;
        a[i + j] = x + y;
        if (a[i + j] >= mod) a[i + j] -= mod;
        a[i + j + len] = x - y;
        if (a[i + j + len] < 0) a[i + j + len] += mod;
      }
}
void multi(z *f, z *g, z *h) {
  static long long a[N << 2], b[N << 2];
  memset(a + n + 1, 0, (lim - n - 1) << 3),
      memset(b + n + 1, 0, (lim - n - 1) << 3);
  for (int i = 0; i <= n; i++) a[i] = f[i].x, b[i] = g[i].x;
  dft(a), dft(b);
  for (int i = 0; i < lim; i++) a[i] = (__int128)a[i] * b[i] % mod;
  dft(a), std::reverse(a + 1, a + lim);
  for (int i = 0; i < lim; i++) a[i] = (__int128)invlim * a[i] % mod;
  for (int i = 0; i <= n; i++) h[i] = h[i] + z(a[i] % p);
}
void transformX2(z s[2][N], z t[2][N], int len) {
  static z f[N];
  for (int i = 0; i <= n; i++) f[i] = s[0][i] + s[1][i];
  {
    int _ = 0;
    for (int i = 0; i <= n; i++) t[_][i] = s[_][i] + s[_ ^ (len & 1)][i];
    _ = 1;
    for (int i = 0; i <= n; i++) t[_][i] = s[_][i] + s[_ ^ (len & 1)][i];
  };
  {
    int _ = 0;
    multi(f, s[_], t[_ ^ (len & 1)]);
    _ = 1;
    multi(f, s[_], t[_ ^ (len & 1)]);
  };
}
void transformP1(z s[2][N], z t[2][N], int len) {
  {
    int _ = 0;
    memcpy(t[_], s[_], (n + 1) << 2);
    _ = 1;
    memcpy(t[_], s[_], (n + 1) << 2);
  };
  t[len & 1][1] = t[len & 1][1] + 1;
  for (int i = 1; i <= n; i++)
    t[len & 1][i] = t[len & 1][i] + s[0][i - 1] + s[1][i - 1];
}
int main() {
  scanf("%d%d%d", &n, &m, &p);
  init(n + 1);
  while (m >> (l + 1)) ++l;
  for (int k = 1; k <= l; k++) len[k] = m >> k;
  for (int k = l; k >= 1; k--) {
    if (len[k] == 1) {
      f[k][1][1] = 1;
    } else {
      if (len[k] - (len[k + 1] << 1)) {
        {
          int _ = 0;
          memset(tmp[_], 0, (n + 1) << 2);
          _ = 1;
          memset(tmp[_], 0, (n + 1) << 2);
        };
        transformX2(f[k + 1], tmp, len[k + 1]);
        transformP1(tmp, f[k], len[k]);
      } else {
        transformX2(f[k + 1], f[k], len[k + 1]);
      }
    }
  }
  for (int k = 1; k <= l; k++)
    for (int i = 1; i <= n; i += 2) ans = ans + f[k][1][i];
  printf("%d\n", ans.x);
}