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;
using ll = long long;
struct Complex {
  long double r, i;
} oc[N], ec[N];
int odd[N], even[N];
inline Complex operator+(const Complex &a, const Complex &b) {
  return {a.r + b.r, a.i + b.i};
}
inline Complex operator-(const Complex &a, const Complex &b) {
  return {a.r - b.r, a.i - b.i};
}
inline Complex operator*(const Complex &a, const Complex &b) {
  return {a.r * b.r - a.i * b.i, a.i * b.r + a.r * b.i};
}
int rev[N], n, ans, P;
ll od[N], ev[N];
const long double PI = acos(-1);
void FFT(Complex a[], int n, int fl) {
  for (int i = 0; i < n; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int s = 1; s < n; s <<= 1) {
    Complex wn = {cos(PI / s), sin(PI / s) * fl};
    for (int i = 0; i < n; i += s << 1) {
      Complex w = {1, 0};
      for (int j = 0; j < s; j++, w = w * wn) {
        Complex x = a[i + j], y = w * a[i + s + j];
        a[i + j] = x + y;
        a[i + s + j] = x - y;
      }
    }
  }
  if (fl == -1)
    for (int i = 0; i < n; i++) a[i].r /= n, a[i].i /= n;
}
inline void dtoc(ll d[], Complex c[], int lim) {
  for (int i = 0; i < lim; i++) c[i] = {0, 0};
  for (int i = 0; i <= n; i++) c[i] = {d[i] * 1.0, 0};
  FFT(c, lim, 1);
}
inline void ctod(Complex c[], ll d[], int lim) {
  FFT(c, lim, -1);
  for (int i = 0; i <= n; i++) d[i] = ll(c[i].r + 0.5);
}
inline void updans() {
  for (int i = 1; i <= n; i += 2) ans = (ans + od[i]) % P;
}
void solve(int mx, int lim) {
  if (mx == 1) {
    ev[0] = 1;
    od[0] = 0;
    od[1] = 1;
    updans();
    return;
  }
  solve(mx / 2, lim);
  for (int i = 0; i <= n; i++) odd[i] = od[i];
  for (int i = 0; i <= n; i++) even[i] = ev[i];
  dtoc(od, oc, lim);
  dtoc(ev, ec, lim);
  for (int i = 0; i < lim; i++) {
    auto v1 = (oc[i] + ec[i]) * oc[i],
         v2 = (oc[i] + ec[i]) * (ec[i] - Complex{1, 0});
    if (!(mx & 2))
      oc[i] = v1, ec[i] = v2;
    else
      ec[i] = v1, oc[i] = v2;
  }
  ctod(oc, od, lim);
  ctod(ec, ev, lim);
  for (int i = n + 1; i <= n * 2; i++) od[i] = ev[i] = 0;
  for (int i = 0; i <= n; i++) {
    od[i] = (od[i] + odd[i]) % P;
    ev[i] = (ev[i] + even[i]) % P;
  }
  if (mx & 1)
    for (int i = n; i > 0; --i) od[i] = (od[i] + od[i - 1] + ev[i - 1]) % P;
  updans();
}
int main() {
  ios::sync_with_stdio(false);
  int mx, lim = 1, d = 0;
  cin >> n >> mx >> P;
  if (mx == 1) {
    cout << 0 << endl;
    return 0;
  }
  while (lim <= n * 2) lim <<= 1, ++d;
  for (int i = 0; i < lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (d - 1));
  solve(mx / 2, lim);
  cout << ans << endl;
  return 0;
}