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 inf = 0x3f3f3f3f;
const long long inff = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-9;
int mod;
namespace Math {
int qp(long long base, long long n, const int mod) {
  long long res = 1;
  while (n) {
    if (n & 1) (res *= base) %= mod;
    (base *= base) %= mod;
    n >>= 1;
  }
  return (int)res;
}
int inv(int x, const int mod) { return qp(x, mod - 2, mod); }
}  // namespace Math
const int mod1 = 998244353, mod2 = 1004535809, mod3 = 469762049, G = 3;
const long long mod_1_2 = 1LL * mod1 * mod2;
const int inv_1 = Math::inv(mod1, mod2),
          inv_2 = Math::inv(mod_1_2 % mod3, mod3);
struct Int {
  int A, B, C;
  Int() : A(0), B(0), C(0) {}
  Int(int __num) : A(__num), B(__num), C(__num) {}
  Int(int __A, int __B, int __C) : A(__A), B(__B), C(__C) {}
  static Int reduce(const Int &x) {
    return Int(x.A + (x.A >> 31 & mod1), x.B + (x.B >> 31 & mod2),
               x.C + (x.C >> 31 & mod3));
  }
  friend Int operator+(const Int &lhs, const Int &rhs) {
    return reduce(
        Int(lhs.A + rhs.A - mod1, lhs.B + rhs.B - mod2, lhs.C + rhs.C - mod3));
  }
  friend Int operator-(const Int &lhs, const Int &rhs) {
    return reduce(Int(lhs.A - rhs.A, lhs.B - rhs.B, lhs.C - rhs.C));
  }
  friend Int operator*(const Int &lhs, const Int &rhs) {
    return Int(1LL * lhs.A * rhs.A % mod1, 1LL * lhs.B * rhs.B % mod2,
               1LL * lhs.C * rhs.C % mod3);
  }
  int get() {
    long long x = 1LL * (B - A + mod2) % mod2 * inv_1 % mod2 * mod1 + A;
    return (1LL * (C - x % mod3 + mod3) % mod3 * inv_2 % mod3 *
                (mod_1_2 % mod) % mod +
            x) %
           mod;
  }
};
namespace Poly {
int lim, s, rev[(32768 << 1)];
Int Wn[(32768 << 1) | 1];
void init(int n) {
  s = -1, lim = 1;
  while (lim < n) lim <<= 1, ++s;
  for (int i = 1; i < lim; ++i) rev[i] = rev[i >> 1] >> 1 | (i & 1) << s;
  const Int t(Math::qp(G, (mod1 - 1) / lim, mod1),
              Math::qp(G, (mod2 - 1) / lim, mod2),
              Math::qp(G, (mod3 - 1) / lim, mod3));
  *Wn = Int(1);
  for (Int *i = Wn; i != Wn + lim; ++i) *(i + 1) = *i * t;
}
void ntt(vector<Int> &A, int op = 1) {
  for (int i = 1; i < lim; ++i)
    if (i < rev[i]) swap(A[i], A[rev[i]]);
  for (int mid = 1; mid < lim; mid <<= 1) {
    int t = lim / mid >> 1;
    for (int i = 0; i < lim; i += mid << 1) {
      for (int j = 0; j < mid; ++j) {
        Int W = op == 1 ? Wn[t * j] : Wn[lim - t * j];
        Int X = A[i + j], Y = A[i + j + mid] * W;
        A[i + j] = X + Y, A[i + j + mid] = X - Y;
      }
    }
  }
  if (op == -1) {
    Int ilim(Math::inv(lim, mod1), Math::inv(lim, mod2), Math::inv(lim, mod3));
    for (int i = 0; i < lim; i++) A[i] = A[i] * ilim;
  }
}
}  // namespace Poly
using Poly::init;
using Poly::ntt;
vector<Int> f[2];
void mul(int deg, int a) {
  using Poly::lim;
  vector<Int> g0(lim), g1(lim), f_(lim);
  for (int i = (0); i <= (int)(deg - 1); ++i)
    f_[i] = (f[0][i].get() + f[1][i].get() + (i == 0)) % mod;
  for (int i = (0); i <= (int)(deg - 1); ++i)
    g0[i] = f[(a ^ 0) & 1][i].get(), g1[i] = f[(a ^ 1) & 1][i].get();
  ntt(f_, 1), ntt(g0, 1), ntt(g1, 1);
  for (int i = (0); i <= (int)(lim - 1); ++i)
    g0[i] = g0[i] * f_[i], g1[i] = g1[i] * f_[i];
  ntt(g0, -1), ntt(g1, -1);
  for (int i = (0); i <= (int)(deg - 1); ++i)
    f[0][i] = (g0[i].get() + f[0][i].get()) % mod,
    f[1][i] = (g1[i].get() + f[1][i].get()) % mod;
}
void add(int deg, int a) {
  for (int i = (deg - 2); i >= (int)(0); --i)
    f[1][i + 1] =
        (f[1][i + 1].get() + f[0][i].get() + f[1][i].get() + (i == 0)) % mod;
}
int main() {
  int n, a;
  scanf("%d%d%d", &(n), &(a), &(mod));
  if (a == 1) {
    return printf("0\n"), 0;
  }
  int ub = (int)log2(a), ans = 1, cur = 1;
  f[0].resize(32768 << 1), f[1].resize(32768 << 1);
  f[1][1] = 1;
  init((n + 5) << 1);
  for (int i = (ub - 1); i >= (int)(1); --i) {
    mul(n + 5, cur);
    cur <<= 1;
    if (a & (1 << i)) add(n + 5, cur), cur++;
    for (int j = 1; j <= n; j += 2) (ans += f[1][j].get()) %= mod;
  }
  printf("%d\n", ans);
  return ~~(0 - 0);
}