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 double pi = acos(-1.0);
const int N = 1e5 + 7;
int n, m, k, p, ans, lim, r[N], w[N], c[N], f1[N], f2[N], f3[N], s1[N], s2[N],
    f[N], g[N], s[N];
namespace Math {
inline int pw(int base, int p, const int mod) {
  static int res;
  for (res = 1; p; p >>= 1, base = static_cast<long long>(base) * base % mod)
    if (p & 1) res = static_cast<long long>(res) * base % mod;
  return res;
}
inline int inv(int x, const int mod) { return pw(x, mod - 2, mod); }
}  // namespace Math
const int mod1 = 998244353, mod2 = 1004535809, mod3 = 469762049, G = 3;
const long long mod_1_2 = static_cast<long long>(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;
  explicit inline Int() {}
  explicit inline Int(int __num) : A(__num), B(__num), C(__num) {}
  explicit inline Int(int __A, int __B, int __C) : A(__A), B(__B), C(__C) {}
  static inline 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));
  }
  inline 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));
  }
  inline friend Int operator-(const Int &lhs, const Int &rhs) {
    return reduce(Int(lhs.A - rhs.A, lhs.B - rhs.B, lhs.C - rhs.C));
  }
  inline friend Int operator*(const Int &lhs, const Int &rhs) {
    return Int(static_cast<long long>(lhs.A) * rhs.A % mod1,
               static_cast<long long>(lhs.B) * rhs.B % mod2,
               static_cast<long long>(lhs.C) * rhs.C % mod3);
  }
  inline int get() {
    long long x =
        static_cast<long long>(B - A + mod2) % mod2 * inv_1 % mod2 * mod1 + A;
    return (static_cast<long long>(C - x % mod3 + mod3) % mod3 * inv_2 % mod3 *
                (mod_1_2 % p) % p +
            x) %
           p;
  }
} a[N], b[N];
namespace Poly {
int lim, s, rev[N];
Int Wn[N | 1];
inline void init(int n) {
  s = -1, lim = 1;
  while (lim < n) lim <<= 1, ++s;
  for (register int i = 1; i < lim; ++i)
    rev[i] = rev[i >> 1] >> 1 | (i & 1) << s;
  const Int t(Math::pw(G, (mod1 - 1) / lim, mod1),
              Math::pw(G, (mod2 - 1) / lim, mod2),
              Math::pw(G, (mod3 - 1) / lim, mod3));
  *Wn = Int(1);
  for (register Int *i = Wn; i != Wn + lim; ++i) *(i + 1) = *i * t;
}
inline void NTT(Int *A, const int op = 1) {
  for (register int i = 1; i < lim; ++i)
    if (i < rev[i]) std::swap(A[i], A[rev[i]]);
  for (register int mid = 1; mid < lim; mid <<= 1) {
    const int t = lim / mid >> 1;
    for (register int i = 0; i < lim; i += mid << 1) {
      for (register int j = 0; j < mid; ++j) {
        const Int W = op ? Wn[t * j] : Wn[lim - t * j];
        const Int X = A[i + j], Y = A[i + j + mid] * W;
        A[i + j] = X + Y, A[i + j + mid] = X - Y;
      }
    }
  }
  if (!op) {
    const Int ilim(Math::inv(lim, mod1), Math::inv(lim, mod2),
                   Math::inv(lim, mod3));
    for (register Int *i = A; i != A + lim; ++i) *i = (*i) * ilim;
  }
}
}  // namespace Poly
inline void mul() {
  for (int i = 0; i < lim; i++) a[i] = Int(f1[i]), b[i] = Int(f2[i]);
  Poly::NTT(a), Poly::NTT(b);
  for (int i = 0; i < Poly::lim; i++) a[i] = a[i] * b[i];
  Poly::NTT(a, 0);
  for (int i = 0; i < lim; i++) f3[i] = a[i].get();
}
int main() {
  cin >> n >> m >> p;
  if (m == 1) {
    cout << 0 << endl;
    return 0;
  }
  m /= 2;
  while (m > 0) w[++w[0]] = m, m /= 2;
  f[1] = 1;
  Poly::init(2 * n + 2), lim = Poly::lim;
  for (int i = 0; i < lim; i++) r[i] = (r[i >> 1] >> 1) | (i & 1) << (k - 1);
  for (int i = w[0]; i > 1; i--) {
    int x = w[i], y = w[i - 1];
    for (int j = 1; j <= n; j += 2) ans = (ans + f[j]) % p;
    for (int j = 0; j <= n; j++) c[j] = (f[j] + g[j]) % p;
    for (int j = 1; j <= n; j++) f1[j] = c[j];
    f1[0] = 1;
    for (int j = 1; j <= n; j++) f2[j] = f[j];
    mul();
    for (int j = 1; j <= n; j++) s1[j] = f3[j];
    for (int j = 1; j <= n; j++) f1[j] = c[j];
    f1[0] = 1;
    for (int j = 1; j <= n; j++) f2[j] = g[j];
    mul();
    for (int j = 1; j <= n; j++) s2[j] = f3[j];
    if (x % 2 == 0)
      for (int j = 1; j <= n; j++)
        f[j] = (f[j] + s1[j]) % p, g[j] = (g[j] + s2[j]) % p;
    else
      for (int j = 1; j <= n; j++)
        f[j] = (f[j] + s2[j]) % p, g[j] = (g[j] + s1[j]) % p;
    if (y % 2 == 1) {
      for (int j = 0; j <= n; j++) c[j] = (f[j] + g[j]) % p;
      c[0] = 1;
      for (int j = 1; j <= n; j++) f[j] = (f[j] + c[j - 1]) % p;
    }
  }
  for (int j = 1; j <= n; j += 2) ans = (ans + f[j]) % p;
  cout << ans << endl;
  return 0;
}