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 = 130000;
const double pi = acos(-1);
struct E {
  double x, y;
  E() {}
  E(const double _x, const double _y) {
    x = _x;
    y = _y;
  }
} w[maxn], t0[maxn], t1[maxn];
int id[maxn];
inline E operator+(const E &x, const E &y) { return E(x.x + y.x, x.y + y.y); }
inline E operator-(const E &x, const E &y) { return E(x.x - y.x, x.y - y.y); }
inline E operator*(const E &x, const E &y) {
  return E(x.x * y.x - x.y * y.y, x.y * y.x + x.x * y.y);
}
long long Mod;
int b, N, ln, n;
void DFT(E s[], const int sig) {
  for (int i = 0; i < N; i++)
    if (i < id[i]) swap(s[i], s[id[i]]);
  for (int m = 2; m <= N; m <<= 1) {
    int t = m >> 1, tt = N / m;
    for (int j = 0; j < N; j += m)
      for (int i = 0; i < t; i++) {
        E wn = sig == 1 ? w[i * tt] : w[N - i * tt];
        E tx = s[j + i], ty = s[j + i + t] * wn;
        s[j + i] = tx + ty;
        s[j + i + t] = tx - ty;
      }
  }
  if (sig == -1)
    for (int i = 0; i < N; i++) s[i].x /= (double)N;
}
long long re = 0, f0[maxn], f1[maxn], temp[maxn], nf0[maxn], nf1[maxn];
void solve() {
  f0[0] = 1;
  int now = 0;
  for (int i = 30; i >= 1; i--) {
    if (now & 1) {
      for (int j = 0; j <= n; j++) t0[j] = E((f0[j] + f1[j]) % Mod, 0);
      for (int j = 0; j <= n; j++) t1[j] = E(f1[j], 0);
      for (int j = n + 1; j < N; j++) t0[j] = t1[j] = E(0, 0);
      DFT(t0, 1);
      DFT(t1, 1);
      for (int j = 0; j < N; j++) t0[j] = t0[j] * t1[j];
      DFT(t0, -1);
      for (int j = 0; j <= n; j++)
        nf0[j] = (f0[j] + ((long long)(t0[j].x + 0.5))) % Mod;
      for (int j = 0; j <= n; j++) t0[j] = E((f0[j] + f1[j]) % Mod, 0);
      for (int j = 0; j <= n; j++) t1[j] = E(f0[j], 0);
      for (int j = n + 1; j < N; j++) t0[j] = t1[j] = E(0, 0);
      DFT(t0, 1);
      DFT(t1, 1);
      for (int j = 0; j < N; j++) t0[j] = t0[j] * t1[j];
      DFT(t0, -1);
      for (int j = 0; j <= n; j++)
        nf1[j] = (((long long)(t0[j].x + 0.5)) % Mod - f0[j] + Mod) % Mod;
    } else {
      for (int j = 0; j <= n; j++) t0[j] = E((f0[j] + f1[j]) % Mod, 0);
      for (int j = 0; j <= n; j++) t1[j] = E(f0[j], 0);
      for (int j = n + 1; j < N; j++) t0[j] = t1[j] = E(0, 0);
      DFT(t0, 1);
      DFT(t1, 1);
      for (int j = 0; j < N; j++) t0[j] = t0[j] * t1[j];
      DFT(t0, -1);
      for (int j = 0; j <= n; j++)
        nf0[j] = (((long long)(t0[j].x + 0.5)) % Mod - f1[j] + Mod) % Mod;
      for (int j = 0; j <= n; j++) t0[j] = E((f0[j] + f1[j]) % Mod, 0);
      for (int j = 0; j <= n; j++) t1[j] = E(f1[j], 0);
      for (int j = n + 1; j < N; j++) t0[j] = t1[j] = E(0, 0);
      DFT(t0, 1);
      DFT(t1, 1);
      for (int j = 0; j < N; j++) t0[j] = t0[j] * t1[j];
      DFT(t0, -1);
      for (int j = 0; j <= n; j++)
        nf1[j] = (f1[j] + ((long long)(t0[j].x + 0.5)) % Mod) % Mod;
    }
    for (int j = 0; j <= n; j++) f0[j] = nf0[j], f1[j] = nf1[j];
    now <<= 1;
    if ((b & (1 << i)) > 0) {
      for (int j = n; j >= 1; j--)
        f1[j] = (f1[j] + f0[j - 1] + f1[j - 1]) % Mod;
      now |= 1;
    }
    for (int j = 1; j <= n; j += 2) re += f1[j];
    re %= Mod;
  }
}
int main() {
  scanf("%d%d%I64d", &n, &b, &Mod);
  N = 1, ln = 0;
  while (N <= 2 * n) N <<= 1, ln++;
  for (int i = 1; i < N; i++) id[i] = (id[i >> 1] >> 1) | ((i & 1) << ln - 1);
  for (int m = 2; m <= N; m <<= 1) {
    int t = m >> 1, tt = N / m;
    for (int i = 0; i < t; i++) {
      w[i * tt] = E(cos(2 * pi * i / m), sin(2 * pi * i / m));
      w[N - i * tt] = E(cos(2 * pi * i / m), sin(-2 * pi * i / m));
    }
  }
  solve();
  printf("%I64d\n", re);
  return 0;
}