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;
namespace fft {
void fft(vector<complex<double> > &a, bool inv) {
  int n = a.size(), j = 0;
  vector<complex<double> > roots(n / 2);
  for (int i = 1; i < n; i++) {
    int bit = (n >> 1);
    while (j >= bit) {
      j -= bit;
      bit >>= 1;
    }
    j += bit;
    if (i < j) swap(a[i], a[j]);
  }
  double ang = 2 * acos(-1) / n * (inv ? -1 : 1);
  for (int i = 0; i < n / 2; i++) {
    roots[i] = complex<double>(cos(ang * i), sin(ang * i));
  }
  for (int i = 2; i <= n; i <<= 1) {
    int step = n / i;
    for (int j = 0; j < n; j += i) {
      for (int k = 0; k < i / 2; k++) {
        complex<double> u = a[j + k], v = a[j + k + i / 2] * roots[step * k];
        a[j + k] = u + v;
        a[j + k + i / 2] = u - v;
      }
    }
  }
  if (inv)
    for (int i = 0; i < n; i++) a[i] /= n;
}
vector<long long> multiply(vector<long long> &v, vector<long long> &w) {
  vector<complex<double> > fv(v.begin(), v.end()), fw(w.begin(), w.end());
  int n = 1;
  while (n < max(v.size(), w.size())) n <<= 1;
  n <<= 1;
  fv.resize(n);
  fw.resize(n);
  fft(fv, 0);
  fft(fw, 0);
  for (int i = 0; i < n; i++) fv[i] *= fw[i];
  fft(fv, 1);
  vector<long long> ret(n);
  for (int i = 0; i < n; i++) ret[i] = (long long)round(fv[i].real());
  return ret;
}
}  // namespace fft
vector<long long> add(vector<long long> a, vector<long long> b, int mod) {
  vector<long long> ans(max(a.size(), b.size()));
  for (int i = 0; i < a.size(); i++) ans[i] += a[i];
  for (int i = 0; i < b.size(); i++) ans[i] += b[i];
  for (auto &i : ans) i %= mod;
  return ans;
}
vector<long long> mul(vector<long long> a, vector<long long> b, int mod) {
  vector<long long> ans = fft::multiply(a, b);
  for (auto &i : ans) i %= mod;
  return ans;
}
vector<long long> neg(vector<long long> a, int mod) {
  for (int i = 0; i < a.size(); ++i) a[i] = (mod - a[i]) % mod;
  return a;
}
vector<long long> ans, binom;
long long tot = 0, m, maxa, maxn;
inline void doublek() {
  ans = add(ans, mul(ans, binom, m), m);
  ans.resize(maxn + 1);
  binom = mul(binom, binom, m);
  binom.resize(maxn + 1);
}
inline void plusone(int k) {
  if (k % 2 == 1) {
    for (int i = 1; i <= maxn; ++i) ans[i] = (ans[i] + binom[i - 1]) % m;
  }
  for (int i = maxn; i >= 1; --i) binom[i] = (binom[i] + binom[i - 1]) % m;
}
inline void upd() {
  for (int i = 1; i <= maxn; i += 2) tot = (tot + ans[i]) % m;
}
inline void comp(long long k) {
  if (k == 0) return;
  if (k == 1) {
    ans.resize(maxn + 1);
    binom.resize(maxn + 1);
    ans[1] = binom[0] = binom[1] = 1;
  } else {
    comp(k / 2);
    if ((k / 2) % 2 == 0) {
      doublek();
    } else {
      ans = add(ans, mul(binom, add(binom, neg(ans, m), m), m), m);
      ans.resize(maxn + 1);
      ans = add(ans, neg(binom, m), m);
      ans.resize(maxn + 1);
      binom = mul(binom, binom, m);
      binom.resize(maxn + 1);
    }
    if (k % 2 == 1) plusone(k);
  }
  for (int i = 1; i <= maxn; i += 2) tot = (tot + ans[i]) % m;
}
int main() {
  cin >> maxn >> maxa >> m;
  maxa /= 2;
  comp(maxa);
  cout << tot << endl;
}