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 = 65536 + 10;
const double pi = acos(-1);
int n, m, _n, mod, ans, r[N], a[N], f[2][N], g[2][N];
void upd(int &x, int y) {
  x += y;
  x -= x >= mod ? mod : 0;
}
void upd_ans() {
  for (int i = 1; i <= m; i += 2) upd(ans, f[1][i]);
}
struct cp {
  double a, b;
  cp(double a = 0, double b = 0) : a(a), b(b) {}
  cp operator+(cp t) { return cp(a + t.a, b + t.b); }
  cp operator-(cp t) { return cp(a - t.a, b - t.b); }
  cp operator*(cp t) { return cp(a * t.a - b * t.b, a * t.b + b * t.a); }
} w[N], A[N], B[N];
void fft_init(int &n) {
  int len = 0;
  while (1 << len < n) len++;
  n = 1 << len;
  w[0] = w[n] = cp(1, 0);
  for (int i = (1); i <= (n - 1); i++) {
    w[i] = cp(cos(2 * i * pi / n), sin(2 * i * pi / n));
    r[i] = (r[i >> 1] >> 1) | ((i & 1) << len - 1);
  }
}
void fft(cp *a, int all, int fl) {
  for (int i = (0); i <= (all - 1); i++)
    if (i < r[i]) swap(a[i], a[r[i]]);
  int n = 2, m = 1, x = all / 2;
  for (; n <= all; m = n, n <<= 1, x >>= 1)
    for (int i = 0; i < all; i += n)
      for (int k = 0; k < m; k++) {
        cp t = w[fl ? all - x * k : x * k] * a[i + m + k];
        a[i + m + k] = a[i + k] - t;
        a[i + k] = a[i + k] + t;
      }
  if (fl)
    for (int i = (0); i <= (all - 1); i++) a[i].a /= all;
}
void mul(int *a, int *b, int *c) {
  for (int i = (0); i <= (m); i++) A[i] = cp(a[i], 0);
  for (int i = (m + 1); i <= (_n - 1); i++) A[i] = cp(0, 0);
  for (int i = (0); i <= (m); i++) B[i] = cp(b[i], 0);
  for (int i = (m + 1); i <= (_n - 1); i++) B[i] = cp(0, 0);
  fft(A, _n, 0);
  fft(B, _n, 0);
  for (int i = (0); i <= (_n - 1); i++) A[i] = A[i] * B[i];
  fft(A, _n, 1);
  for (int i = (1); i <= (m); i++) c[i] = (long long)(A[i].a + 0.5) % mod;
}
void solve(int n) {
  if (n == 1) {
    f[1][1] = 1;
    if (n != ::n) upd_ans();
    return;
  }
  solve(n / 2);
  memset(g, 0, sizeof(g));
  for (int i = (1); i <= (m); i++) a[i] = (f[0][i] + f[1][i]) % mod;
  for (int t = (0); t <= (1); t++) {
    mul(a, f[t ^ ((n / 2) & 1)], g[t]);
    for (int i = (1); i <= (m); i++) {
      upd(g[t][i], f[t][i]);
      upd(g[t][i], f[t ^ ((n / 2) & 1)][i]);
    }
  }
  if (n & 1) {
    for (int i = m; i > 1; i--) upd(g[1][i], (g[1][i - 1] + g[0][i - 1]) % mod);
    upd(g[1][1], 1);
  }
  memcpy(f, g, sizeof(g));
  if (n != ::n) upd_ans();
}
int main() {
  scanf("%d%d%d", &m, &n, &mod);
  _n = m + m + 1;
  fft_init(_n);
  solve(n);
  printf("%d\n", ans);
  return 0;
}