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>
#pragma GCC optimize("-O3")
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
void Out(int x) {
  if (x > 9) Out(x / 10);
  putchar('0' + x % 10);
}
long long gcd(long long x, long long y) {
  if (!y) return x;
  return gcd(y, x % y);
}
long long qpow(long long x, long long y, long long P) {
  long long re = 1;
  while (y) {
    if (y & 1) re = re * x % P;
    x = x * x % P;
    y >>= 1;
  }
  return re;
}
const long double eps = 1e-6;
const long double PI = acos(-1);
const long long inf = 1e16;
const int N = 2e5 + 50;
struct V {
  long double x, y;
  V(long double _x = 0, long double _y = 0) {
    x = _x;
    y = _y;
  }
};
V operator+(V a, V b) { return V(a.x + b.x, a.y + b.y); }
V operator-(V a, V b) { return V(a.x - b.x, a.y - b.y); }
V operator*(V a, V b) {
  return V(a.x * b.x - a.y * b.y, a.x * b.y + a.y * b.x);
}
struct FFT {
  int n;
  int rev[200000];
  void init(int m) {
    int k = 0;
    n = 1;
    while (n < m) {
      ++k;
      n <<= 1;
    }
    for (int i = 0; i < n; ++i) {
      int t = 0;
      for (int j = 0; j < k; ++j)
        if (i & (1 << j)) t |= (1 << (k - j - 1));
      rev[i] = t;
    }
  }
  void DFT(V *a, int flag) {
    for (int i = 0; i < n; ++i)
      if (i < rev[i]) swap(a[i], a[rev[i]]);
    for (int l = 2; l <= n; l <<= 1) {
      int m = l >> 1;
      V wn(cos(2 * PI / l), flag * sin(2 * PI / l));
      for (V *p = a; p != a + n; p += l) {
        V w(1, 0);
        for (int k = 0; k < m; ++k) {
          V t = w * p[k + m];
          p[k + m] = p[k] - t;
          p[k] = p[k] + t;
          w = w * wn;
        }
      }
    }
    if (flag == -1)
      for (int i = 0; i < n; ++i) a[i].x /= n;
  }
  void CHENG(V *a, V *b, int m) {
    init(m);
    DFT(a, 1);
    DFT(b, 1);
    for (int i = 0; i < n; ++i) a[i] = a[i] * b[i];
    DFT(a, -1);
  }
} fft;
V a[N], b[N];
long long n, mx, P, ans = 0;
long long A[2][N], B[N];
long long C[2][N];
void BZ(int x) {
  x = x & 1;
  for (int i = 0; i <= n; ++i) B[i] = (A[0][i] + A[1][i]) % P;
  for (int i = 0; i <= n; ++i) {
    b[i].x = B[i];
    b[i].y = 0;
  }
  fft.DFT(b, 1);
  for (int i = 1; i <= n; ++i) {
    a[i].x = A[x][i];
    a[i].y = 0;
  }
  fft.DFT(a, 1);
  for (int i = 0; i < fft.n; ++i) a[i] = a[i] * b[i];
  fft.DFT(a, -1);
  for (int i = 0; i <= n; ++i) C[0][i] = (long long)(a[i].x + 0.5);
  for (int i = 0; i < fft.n; ++i) a[i].x = a[i].y = 0;
  for (int i = 1; i <= n; ++i) {
    a[i].x = A[x ^ 1][i];
    a[i].y = 0;
  }
  fft.DFT(a, 1);
  for (int i = 0; i < fft.n; ++i) a[i] = a[i] * b[i];
  fft.DFT(a, -1);
  for (int i = 0; i <= n; ++i) C[1][i] = (long long)(a[i].x + 0.5);
  for (int i = 0; i < fft.n; ++i) a[i].x = a[i].y = b[i].x = b[i].y = 0;
  for (int i = 0; i <= n; ++i) {
    A[0][i] = (A[0][i] + C[0][i]) % P;
    A[1][i] = (A[1][i] + C[1][i]) % P;
  }
}
void add(int x) {
  x = (x + 1) & 1;
  for (int i = 0; i <= n; ++i) B[i] = (A[0][i] + A[1][i]) % P;
  for (int i = 0; i < n; ++i) A[x][i + 1] = (A[x][i + 1] + B[i]) % P;
}
int main() {
  scanf("%I64d%I64d%I64d", &n, &mx, &P);
  fft.init(n + n + 3);
  int now = 31;
  while ((mx & (1 << now)) == 0) --now;
  int i = 0;
  A[0][0] = 1;
  for (; now >= 1; --now) {
    BZ(i);
    i <<= 1;
    if (mx & (1 << now)) {
      add(i);
      ++i;
    }
    for (int i = 1; i <= n; i += 2) ans = (ans + A[1][i]) % P;
  }
  printf("%I64d\n", ans);
  return 0;
}