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 Maxn = 120000;
int n, m, p;
namespace Poly {
const long double PI = acos(-1.0);
struct Complex {
  long double r, i;
  Complex(long double _r = 0, long double _i = 0) {
    r = _r;
    i = _i;
  }
  Complex conj() { return Complex(r, -i); }
  friend Complex operator+(Complex a, Complex b) {
    return Complex(a.r + b.r, a.i + b.i);
  }
  friend Complex operator-(Complex a, Complex b) {
    return Complex(a.r - b.r, a.i - b.i);
  }
  friend Complex operator*(Complex a, Complex b) {
    return Complex(a.r * b.r - a.i * b.i, a.r * b.i + a.i * b.r);
  }
  Complex operator/=(int n) {
    r /= n;
    i /= n;
    return (*this);
  }
};
Complex a[Maxn + 5], b[Maxn + 5], c[Maxn + 5], d[Maxn + 5];
void FFT(Complex *a, int flag, int n) {
  static int R[Maxn + 5], last_len = 0;
  int len = 1, L = 0;
  while (len < n) {
    len <<= 1;
    L++;
  }
  if (len != last_len) {
    last_len = len;
    for (int i = 0; i < len; i++) {
      R[i] = (R[i >> 1] >> 1) | ((i & 1) << (L - 1));
    }
  }
  for (int i = 0; i < len; i++) {
    if (i < R[i]) {
      swap(a[i], a[R[i]]);
    }
  }
  for (int j = 1; j < len; j <<= 1) {
    Complex T = Complex(cos(PI / j), flag * sin(PI / j));
    for (int k = 0; k < len; k += (j << 1)) {
      Complex t = Complex(1, 0);
      for (int l = 0; l < j; l++, t = t * T) {
        Complex Nx = a[k + l], Ny = t * a[j + k + l];
        a[k + l] = Nx + Ny;
        a[j + k + l] = Nx - Ny;
      }
    }
  }
  if (flag == -1) {
    for (int i = 0; i < len; i++) {
      a[i] /= len;
    }
  }
}
void MTT(int *f, int *g, int *h, int n, int p) {
  for (int i = 0; i < n; i++) {
    a[i].r = (f[i] >> 15), a[i].i = (f[i] & 32767);
    c[i].r = (g[i] >> 15), c[i].i = (g[i] & 32767);
  }
  FFT(a, 1, n);
  FFT(c, 1, n);
  b[0] = a[0].conj();
  for (int i = 1; i < n; i++) {
    b[i] = a[n - i].conj();
  }
  d[0] = c[0].conj();
  for (int i = 1; i < n; i++) {
    d[i] = c[n - i].conj();
  }
  for (int i = 0; i < n; i++) {
    Complex tmp_a = (a[i] + b[i]) * Complex(0.5, 0),
            tmp_b = (a[i] - b[i]) * Complex(0, -0.5),
            tmp_c = (c[i] + d[i]) * Complex(0.5, 0),
            tmp_d = (c[i] - d[i]) * Complex(0, -0.5);
    a[i] = tmp_a * tmp_c + Complex(0, 1) * (tmp_a * tmp_d + tmp_b * tmp_c);
    b[i] = tmp_b * tmp_d;
  }
  FFT(a, -1, n);
  FFT(b, -1, n);
  for (int i = 0; i < n; i++) {
    int tmp_a = ((long long)(a[i].r + 0.5)) % p,
        tmp_b = ((long long)(a[i].i + 0.5)) % p,
        tmp_c = ((long long)(b[i].r + 0.5)) % p;
    h[i] =
        ((1ll * tmp_a * (1 << 30) + 1ll * tmp_b * (1 << 15) + tmp_c) % p + p) %
        p;
  }
}
}  // namespace Poly
using Poly::MTT;
void mul(int *a, int *b, int *c) {
  int len = 1;
  while (len <= (n << 1)) {
    len <<= 1;
  }
  MTT(a, b, c, len, p);
}
int a[2][Maxn + 5];
void mul_2(int len) {
  static int b[2][Maxn + 5], c[Maxn + 5], d[Maxn + 5];
  for (int i = 0; i <= n; i++) {
    b[0][i] = a[0][i];
    b[1][i] = a[1][i];
    c[i] = (a[0][i] + a[1][i]) % p;
  }
  c[0] = (c[0] + 1) % p;
  mul(a[0 ^ (len & 1)], c, d);
  for (int i = 0; i <= n; i++) {
    b[0][i] = (b[0][i] + d[i]) % p;
  }
  mul(a[1 ^ (len & 1)], c, d);
  for (int i = 0; i <= n; i++) {
    b[1][i] = (b[1][i] + d[i]) % p;
  }
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j <= n; j++) {
      a[i][j] = b[i][j];
    }
  }
}
void add_1(int len) {
  static int b[2][Maxn + 5], c[Maxn + 5];
  for (int i = 0; i <= n; i++) {
    b[0][i] = a[0][i];
    b[1][i] = a[1][i];
    c[i] = (a[0][i] + a[1][i]) % p;
  }
  c[0] = (c[0] + 1) % p;
  for (int i = n; i > 0; i--) {
    c[i] = c[i - 1];
  }
  c[0] = 0;
  for (int i = 0; i <= n; i++) {
    b[(len + 1) & 1][i] = (b[(len + 1) & 1][i] + c[i]) % p;
  }
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j <= n; j++) {
      a[i][j] = b[i][j];
    }
  }
}
int ans;
void solve(int m, bool flag = 0) {
  if (m == 1) {
    a[1][1] = 1;
    if (flag) {
      ans = 1;
    }
    return;
  }
  solve(m >> 1, 1);
  mul_2(m >> 1);
  if (m & 1) {
    add_1(m - 1);
  }
  if (flag) {
    for (int i = 1; i <= n; i += 2) {
      ans = (ans + a[1][i]) % p;
    }
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &p);
  solve(m);
  printf("%d\n", ans);
  return 0;
}