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 = 1 << 20;
int n, m, p, res, all;
int ksm(int x, int y, int mod) {
  int z = 1;
  for (; y; y >>= 1, x = 1ll * x * x % mod)
    if (y & 1) z = 1ll * z * x % mod;
  return z;
}
int INV(int x, int mod) { return ksm(x, mod - 2, mod); }
void ADD(int &x, int y) {
  x += y;
  if (x >= p) x -= p;
}
int RED(int x) {
  if (x >= p) x -= p;
  return x;
}
namespace xtx {
struct Poly {
  int mod;
  const int G = 3;
  int rev[N];
  int ksm(int x, int y) {
    int rt = 1;
    for (; y; x = (1ll * x * x) % mod, y >>= 1)
      if (y & 1) rt = (1ll * rt * x) % mod;
    return rt;
  }
  void NTT(int *a, int tp, int LG) {
    int lim = (1 << LG), invlim = ksm(lim, mod - 2);
    for (int i = 0; i < lim; i++)
      rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (LG - 1));
    for (int i = 0; i < lim; i++)
      if (i < rev[i]) swap(a[i], a[rev[i]]);
    for (int md = 1; md < lim; md <<= 1) {
      int rt = ksm(G, (mod - 1) / (md << 1));
      if (tp == -1) rt = ksm(rt, mod - 2);
      for (int stp = md << 1, pos = 0; pos < lim; pos += stp) {
        int w = 1;
        for (int i = 0; i < md; i++, w = (1ll * w * rt) % mod) {
          int x = a[pos + i], y = (1ll * w * a[pos + md + i]) % mod;
          a[pos + i] = (x + y) % mod;
          a[pos + md + i] = (x - y + mod) % mod;
        }
      }
    }
    if (tp == -1)
      for (int i = 0; i < lim; i++) a[i] = (1ll * a[i] * invlim) % mod;
  }
  int A[N], B[N];
  void mul(int *a, int *b, int LG) {
    int lim = (1 << LG);
    for (int i = 0; i < lim; i++) A[i] = B[i] = 0;
    for (int i = 0; i < (lim >> 1); i++) A[i] = a[i], B[i] = b[i];
    NTT(A, 1, LG), NTT(B, 1, LG);
    for (int i = 0; i < lim; i++) A[i] = 1ll * A[i] * B[i] % mod;
    NTT(A, -1, LG);
  }
} poly[2];
const int mod0 = 998244353, mod1 = 1004535809;
const int inv0 = INV(mod0, mod1);
void MTT(int *a, int *b, int *c, int LG) {
  for (int i = 0; i < 2; i++) poly[i].mul(a, b, LG);
  for (int i = 0; i < (1 << LG); i++)
    c[i] = (1ll * (poly[1].A[i] - poly[0].A[i] + mod1) % mod1 * inv0 % mod1 *
                mod0 +
            poly[0].A[i]) %
           p;
}
int f[2][N];
int A[N], B[N], C[N];
void KSM(int k, int LG) {
  if (k == 0) return;
  KSM(k >> 1, LG);
  for (int i = 0; i <= n; i++) C[i] = RED(f[0][i] + f[1][i]);
  ADD(C[0], 1);
  if (k & 2)
    MTT(f[0], C, B, LG), MTT(f[1], C, A, LG);
  else
    MTT(f[0], C, A, LG), MTT(f[1], C, B, LG);
  for (int i = 0; i <= n; i++) ADD(f[0][i], A[i]), ADD(f[1][i], B[i]);
  if (k & 1) {
    for (int i = 0; i <= n; i++) C[i] = RED(f[0][i] + f[1][i]);
    ADD(C[0], 1);
    for (int i = 1; i <= n; i++) ADD(f[1][i], C[i - 1]);
  }
  for (int i = 1; i <= n; i += 2) ADD(res, f[1][i]);
}
void prep() { poly[0].mod = mod0, poly[1].mod = mod1; }
}  // namespace xtx
int main() {
  scanf("%d%d%d", &n, &m, &p), xtx::prep();
  while ((1 << all) <= n) all++;
  xtx::KSM(m >> 1, all + 1);
  printf("%d\n", res);
  return 0;
}