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;
int n, m, md;
long long ans;
inline int pow(int a, int b, const int& md) {
  int ret = 1;
  for (; b; b >>= 1, a = (long long)a * a % md)
    if (b & 1) ret = (long long)ret * a % md;
  return ret;
}
inline int inv(int a, const int& md) { return pow(a, md - 2, md); }
namespace poly {
const int md1 = 998244353, md2 = 1004535809;
const long long M = (long long)md1 * md2;
const int iv1_2 = inv(md1, md2), iv2_1 = inv(md2, md1);
inline long long mul(long long a, long long b, const long long& md) {
  const long long c = a * b - (long long)((long double)a * b / md + .5) * md;
  return (c >> 63 & md) + c;
}
int rev[N], lim;
struct I {
  int a, b;
  I() {}
  I(int x) : a(x % md1), b(x % md2) {}
  I(int x, int y) : a(x % md1), b(y % md2) {}
  I(long long x, long long y) : a(x % md1), b(y % md2) {}
  I(unsigned long long x, unsigned long long y) : a(x % md1), b(y % md2) {}
  inline I operator*(const I& r) const {
    return I((long long)a * r.a, (long long)b * r.b);
  }
  inline int crt() {
    long long x = (mul((long long)a * md2, iv2_1, M) +
                   mul((long long)b * md1, iv1_2, M)) %
                  M;
    return x % md;
  }
} odd[N], even[N], W[N], iv, O[N], E[N], K[N], odd_[N], even_[N];
void init_w() {
  for (int i = 1; i < n * 2; i <<= 1) {
    const I w =
        I(pow(3, (md1 - 1) / (i << 1), md1), pow(3, (md2 - 1) / (i << 1), md2));
    W[i] = I(1);
    for (int j = 1; j < i; ++j) W[i + j] = W[i + j - 1] * w;
  }
}
void init(int n) {
  int l = -1;
  for (lim = 1; lim < n; lim <<= 1) ++l;
  for (int i = 1; i < lim; ++i) rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << l);
  iv = I(inv(lim, md1), inv(lim, md2));
}
void FFT(I* a, int f) {
  static unsigned long long A[N], B[N];
  for (int i = 0; i < lim; ++i) A[i] = a[rev[i]].a, B[i] = a[rev[i]].b;
  for (int i = 1; i < lim; i <<= 1)
    for (int j = 0; j < lim; j += i << 1)
      for (int k = 0; k < i; ++k) {
        const unsigned long long x1 = A[j + k], x2 = B[j + k];
        const unsigned long long y1 = A[j + k + i] * W[i + k].a % md1,
                                 y2 = B[j + k + i] * W[i + k].b % md2;
        A[j + k] += y1, B[j + k] += y2, A[j + k + i] = x1 + md1 - y1,
                                                  B[j + k + i] = x2 + md2 - y2;
      }
  for (int i = 0; i < lim; ++i) a[i] = I(A[i], B[i]);
  if (!f) {
    for (int i = 0; i < lim; ++i) a[i] = a[i] * iv;
    std::reverse(a + 1, a + lim);
  }
}
void solve(int m) {
  if (m == 1)
    odd[1] = ans = 1;
  else {
    solve(m / 2);
    for (int i = 0; i < lim; ++i)
      O[i] = E[i] = K[i] = 0, odd_[i] = odd[i], even_[i] = even[i];
    for (int i = 1; i < n; ++i) K[i] = (odd[i].a + even[i].a) % md;
    K[0] = 1;
    FFT(K, 1), FFT(odd, 1), FFT(even, 1);
    if (m >> 1 & 1)
      for (int i = 0; i < lim; ++i) O[i] = K[i] * even[i], E[i] = K[i] * odd[i];
    else
      for (int i = 0; i < lim; ++i) O[i] = K[i] * odd[i], E[i] = K[i] * even[i];
    FFT(O, 0), FFT(E, 0);
    for (int i = 0; i < n; ++i)
      O[i] = (O[i].crt() + odd_[i].a) % md,
      E[i] = (E[i].crt() + even_[i].a) % md;
    for (int i = n; i < lim; ++i) O[i] = E[i] = 0;
    if (m & 1)
      for (int i = n - 1; i; --i)
        O[i] = ((i == 1) ? O[i].a + 1 : O[i].a + O[i - 1].a + E[i - 1].a) % md;
    for (int i = 0; i < n; ++i) odd[i] = O[i], even[i] = E[i];
    for (int i = n; i < lim; ++i) odd[i] = even[i] = 0;
    for (int i = 1; i < n; ++ ++i) ans += odd[i].a;
  }
}
}  // namespace poly
int main() {
  scanf("%d%d%d", &n, &m, &md), ++n;
  if (m == 1) return puts("0"), 0;
  poly::init_w();
  poly::init(n << 1);
  poly::solve(m / 2);
  printf("%lld\n", ans % md);
  return 0;
}