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 p1 = 998244353, p2 = 469762049, Maxn = 1 << 17 | 5;
int maxn, maxa, mod, rev[Maxn];
int tot, l[Maxn];
const long long lcm = p1 * (long long)p2;
void get_rev(int len) {
  for (int i = 0; i < len; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) * (len >> 1));
}
long long fast_pow(long long x, long long y, int p) {
  long long ans = 1, now = x;
  while (y) {
    if (y & 1) ans = ans * now % p;
    now = now * now % p;
    y >>= 1;
  }
  return ans;
}
void NTT(int now[], int len, int p, bool type = false) {
  l[0] = 1;
  int inv3 = fast_pow(3, p - 2, p);
  for (int i = 0; i < len; i++)
    if (i < rev[i]) swap(now[i], now[rev[i]]);
  for (int i = 1; i < len; i <<= 1) {
    long long w = fast_pow(type ? inv3 : 3, (p - 1) / (i << 1), p);
    for (int j = 1; j < i; j++) l[j] = l[j - 1] * w % p;
    for (int j = 0; j < len; j += (i << 1))
      for (int k = j; k < i + j; k++) {
        int x = now[i + k] * (long long)l[k - j] % p, y = now[k];
        now[k] = (x + y) % p;
        now[i + k] = (y - x + p) % p;
      }
  }
  if (type) {
    long long inv = fast_pow(len, p - 2, p);
    for (int i = 0; i < len; i++) now[i] = now[i] * inv % p;
  }
}
void multi(int x[], int y[], int result[], int len, int p) {
  NTT(x, len, p), NTT(y, len, p);
  for (int i = 0; i < len; i++) result[i] = x[i] * (long long)y[i] % p;
  NTT(result, len, p, true);
}
long long mul(long long x, long long y) {
  return ((unsigned long long)x * y -
          (long long)(x / (long double)lcm * y) * lcm + lcm) %
         lcm;
}
void multi(int x[], int y[], int result[], int len) {
  get_rev(len);
  static int tmp1[Maxn], tmp2[Maxn], tmpx[Maxn], tmpy[Maxn];
  for (int i = 0; i < len; i++) tmpx[i] = x[i], tmpy[i] = y[i];
  multi(tmpx, tmpy, tmp1, len, p1);
  for (int i = 0; i < len; i++) tmpx[i] = x[i], tmpy[i] = y[i];
  multi(tmpx, tmpy, tmp2, len, p2);
  long long P1 = fast_pow(p2, p1 - 2, p1), P2 = fast_pow(p1, p2 - 2, p2);
  for (int i = 0; i < len; i++)
    result[i] =
        (mul(mul(tmp1[i], p2), P1) + mul(mul(tmp2[i], p1), P2)) % lcm % mod;
}
void poly_pow(int y, int len) {
  int now = 0;
  static int ans[2][Maxn];
  memset(ans[0], 0, sizeof(int[len << 1]));
  memset(ans[1], 0, sizeof(int[len << 1]));
  static int tmp[Maxn], result[2][Maxn];
  for (int j = 30; j >= 0; j--) {
    cerr << j << endl;
    memset(tmp, 0, sizeof(int[len << 1]));
    for (int i = 0; i < len; i++) tmp[i] = (ans[0][i] + ans[1][i]) % mod;
    tmp[0]++;
    for (int p = 0; p <= 1; p++)
      multi(tmp, ans[(now & 1) ^ p], result[p], len << 1);
    for (int p = 0; p <= 1; p++)
      for (int i = 0; i < len; i++) (ans[p][i] += result[p][i]) %= mod;
    now <<= 1;
    if (y & (1 << j)) {
      for (int i = len - 1; i; i--)
        (ans[1][i] += ans[0][i - 1] + ans[1][i - 1]) %= mod;
      ans[1][1]++;
      now++;
    }
    if (now != y)
      for (int i = 1; i <= maxn; i += 2) (tot += ans[1][i]) %= mod;
  }
}
int lower(int x) {
  int tmp = 1;
  for (; tmp < x; tmp <<= 1)
    ;
  return tmp;
}
int main() {
  scanf("%d%d%d", &maxn, &maxa, &mod);
  poly_pow(maxa, lower(maxn + 1));
  printf("%d", tot);
  return 0;
}