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>
const int mod1 = 998244353;
const int mod2 = 1004535809;
int pow(int a, int b, int m, int r = 1) {
  for (; b; b >>= 1, a = (long long)a * a % m)
    if (b & 1) r = (long long)r * a % m;
  return r;
}
const int imod = pow(mod1, mod2 - 2, mod2);
const int MAXN = 1048577;
class num {
  int a1, a2;

 public:
  num() { a1 = a2 = 0; }
  num(int x) { a1 = x, a2 = x; }
  num(int a, int b) { a1 = a, a2 = b; }
  num operator+(num b) const {
    b.a1 += a1 - mod1;
    b.a1 += b.a1 >> 31 & mod1;
    b.a2 += a2 - mod2;
    b.a2 += b.a2 >> 31 & mod2;
    return b;
  }
  num operator-(num b) const {
    num r = *this;
    r.a1 -= b.a1;
    r.a1 += r.a1 >> 31 & mod1;
    r.a2 -= b.a2;
    r.a2 += r.a2 >> 31 & mod2;
    return r;
  }
  num operator*(num b) const {
    b.a1 = (long long)a1 * b.a1 % mod1;
    b.a2 = (long long)a2 * b.a2 % mod2;
    return b;
  }
  num pow(int x, int y) const {
    return num(::pow(a1, x, mod1), ::pow(a2, y, mod2));
  }
  num inv() const { return pow(mod1 - 2, mod2 - 2); }
  long long operator()() const {
    int k = (long long)(a2 - a1 + mod2) * imod % mod2;
    return (long long)k * mod1 + a1;
  }
} wn[MAXN], wt[MAXN];
int rev[MAXN], lim, dig;
void init(int sz) {
  lim = 1, dig = -1;
  while (lim < sz) lim <<= 1, ++dig;
  for (int i = 0; i < lim; ++i) rev[i] = rev[i >> 1] >> 1 | (i & 1) << dig;
  const num Wn = num(3).pow((mod1 - 1) / lim, (mod2 - 1) / lim);
  *wn = num(1);
  for (int i = 1; i <= lim; ++i) wn[i] = wn[i - 1] * Wn;
}
void NTT(num* A, int typ) {
  for (int i = 0; i < lim; ++i)
    if (i < rev[i]) std::swap(A[i], A[rev[i]]);
  for (int mid = 1; mid != lim; mid <<= 1) {
    const int Wn = lim / mid / 2;
    for (int i = 0, W = 0; i != mid; ++i, W += Wn)
      wt[i] = wn[typ == 1 ? W : lim - W];
    for (int k = 0; k != lim; k += mid << 1) {
      const num* W = wt;
      for (int l = 0; l != mid; ++l) {
        num X = A[l + k], Y = *(W++) * A[l + k + mid];
        A[l + k] = X + Y;
        A[l + k + mid] = X - Y;
      }
    }
  }
  if (typ == -1) {
    num liminv = num(lim).inv();
    for (int i = 0; i != lim; ++i) A[i] = A[i] * liminv;
  }
}
std::ostream& operator<<(std::ostream& out, const std::vector<int>& x) {
  const int s = x.size();
  out << '(';
  for (int i = 0; i != s; ++i) out << x[i] << (" )"[i == s - 1]);
  return out;
}
int A, mod;
void reduce(int& x) { x += x >> 31 & mod; }
std::vector<int> operator*(const std::vector<int>& a,
                           const std::vector<int>& b) {
  static num ta[MAXN], tb[MAXN];
  static int res[MAXN];
  const int ls = a.size(), rs = b.size();
  const int sz = ls + rs - 1;
  init(sz);
  for (int i = 0; i < ls; ++i) ta[i] = num(a[i]);
  for (int i = 0; i < rs; ++i) tb[i] = num(b[i]);
  std::fill(ta + ls, ta + lim, num());
  std::fill(tb + rs, tb + lim, num());
  NTT(ta, 1);
  NTT(tb, 1);
  for (int i = 0; i < lim; ++i) ta[i] = ta[i] * tb[i];
  NTT(ta, -1);
  for (int i = 0; i < sz; ++i) res[i] = ta[i]() % mod;
  return std::vector<int>(res, res + std::min(sz, A));
}
std::vector<int> operator+(const std::vector<int>& a,
                           const std::vector<int>& b) {
  static int res[MAXN];
  const int ls = a.size(), rs = b.size();
  const int sz = std::max(ls, rs);
  std::fill(res, res + sz, 0);
  for (int i = 0; i != ls; ++i) res[i] = a[i];
  for (int i = 0; i != rs; ++i) reduce(res[i] += b[i] - mod);
  return std::vector<int>(res, res + sz);
}
int P, Q, N;
int Ans = 0;
std::pair<std::vector<int>, std::vector<int> > solve(int K) {
  if (K == 0) return std::pair<std::vector<int>, std::vector<int> >({0}, {0});
  if (K == 1) {
    reduce(Ans += 1 - mod);
    return std::pair<std::vector<int>, std::vector<int> >({0, 1}, {0});
  }
  int nt = K >> 1;
  std::pair<std::vector<int>, std::vector<int> > ret = solve(nt);
  std::vector<int> sm = ret.second + ret.first + std::vector<int>({1});
  std::vector<int> odd = ret.first + sm * (nt & 1 ? ret.second : ret.first);
  std::vector<int> even = ret.second + sm * (nt & 1 ? ret.first : ret.second);
  if (K & 1) {
    std::swap(odd, even);
    odd = odd * std::vector<int>({1, 1}) + std::vector<int>({0, 1});
    even = even * std::vector<int>({1, 1});
  }
  const int sz = odd.size();
  for (int i = 1; i < sz; i += 2) reduce(Ans += odd[i] - mod);
  return std::pair<std::vector<int>, std::vector<int> >(odd, even);
}
int main() {
  std::ios_base::sync_with_stdio(false), std::cin.tie(0);
  int B;
  std::cin >> A >> B >> mod;
  ++A;
  solve(B / 2);
  std::cout << Ans << std::endl;
  return 0;
}