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 MAXN = (1 << 16) + 5;
const long double PI = acos(-1.0);
template <typename T>
inline void read(T &AKNOI) {
  T x = 0, flag = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  AKNOI = flag * x;
}
namespace ModCalculator {
int MOD;
inline void Inc(int &x, int y) {
  x += y;
  if (x >= MOD) x -= MOD;
}
inline int Add(int x, int y) {
  Inc(x, y);
  return x;
}
}  // namespace ModCalculator
using namespace ModCalculator;
struct comp {
  long double r, i;
  comp() {}
  comp(long double _r, long double _i) : r(_r), i(_i) {}
  friend comp operator+(comp a, comp b) { return comp(a.r + b.r, a.i + b.i); }
  friend comp operator-(comp a, comp b) { return comp(a.r - b.r, a.i - b.i); }
  friend comp operator*(comp a, comp b) {
    return comp(a.r * b.r - a.i * b.i, a.r * b.i + a.i * b.r);
  }
};
int N, M, ans;
int len, rev[MAXN], f[MAXN], g[MAXN];
comp w[MAXN], A[MAXN], B[MAXN], C[MAXN];
void FFT_init(int m) {
  int bit = -1;
  for (len = 1; len < m; len <<= 1, ++bit)
    ;
  for (int i = 0; i < len; ++i) {
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << bit);
  }
  for (int i = 1; i < len; i <<= 1) {
    comp wn(cos(PI / i), sin(PI / i)), wk(1, 0);
    for (int k = 0; k < i; ++k) {
      w[i + k] = wk;
      wk = wk * wn;
    }
  }
}
void FFT(comp *a) {
  for (int i = 0; i < len; ++i) {
    if (i < rev[i]) {
      swap(a[i], a[rev[i]]);
    }
  }
  for (int i = 1; i < len; i <<= 1) {
    for (int j = 0; j < len; j += (i << 1)) {
      for (int k = 0; k < i; ++k) {
        comp x = a[j + k], y = w[i + k] * a[j + k + i];
        a[j + k] = x + y;
        a[j + k + i] = x - y;
      }
    }
  }
}
void Calc(int m) {
  if (m == 1) {
    f[0] = g[0] = g[1] = ans = 1;
    return;
  }
  Calc(m / 2);
  A[0] = comp(1, 0);
  B[0] = C[0] = comp(0, 0);
  for (int i = 1; i <= N; ++i) {
    A[i] = comp(Add(f[i], g[i]), 0);
    B[i] = comp(f[i], 0);
    C[i] = comp(g[i], 0);
  }
  for (int i = N + 1; i < len; ++i) {
    A[i] = B[i] = C[i] = comp(0, 0);
  }
  FFT(A);
  FFT(B);
  FFT(C);
  for (int i = 0; i < len; ++i) {
    B[i] = A[i] * B[i];
    C[i] = A[i] * C[i];
  }
  FFT(B);
  FFT(C);
  reverse(B + 1, B + len);
  reverse(C + 1, C + len);
  for (int i = 1, flag = (m / 2) & 1; i <= N; ++i) {
    Inc((flag ? g : f)[i], (long long)(B[i].r / len + 0.5) % MOD);
    Inc((flag ? f : g)[i], (long long)(C[i].r / len + 0.5) % MOD);
  }
  if (m & 1) {
    for (int i = N; i >= 1; --i) {
      Inc(g[i], g[i - 1]);
      if (i > 1) Inc(g[i], f[i - 1]);
    }
  }
  for (int i = 1; i <= N; i += 2) {
    Inc(ans, g[i]);
  }
}
void solve() {
  read(N);
  read(M);
  read(MOD);
  if (M == 1) {
    printf("0\n");
    return;
  }
  FFT_init(N + N);
  Calc(M / 2);
  printf("%d\n", ans);
}
int main() {
  solve();
  return 0;
}