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>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize("Ofast")
using namespace std;
namespace ywy {
const long double pi = acos(-1);
typedef struct _fushu {
  long double a;
  long double b;
  _fushu() { a = b = 0; }
  _fushu(long double x, long double y) {
    a = x;
    b = y;
  }
  friend _fushu operator+(const _fushu &a, const _fushu &b) {
    return (_fushu(a.a + b.a, a.b + b.b));
  }
  friend _fushu operator-(const _fushu &a, const _fushu &b) {
    return (_fushu(a.a - b.a, a.b - b.b));
  }
  friend _fushu operator*(const _fushu &a, const _fushu &b) {
    return (_fushu(a.a * b.a - a.b * b.b, a.a * b.b + a.b * b.a));
  }
} fushu;
int hudie[131073];
fushu dks[2][131073], a[131073], b[131073], c[131073];
inline void fft(int n, fushu *f, int op) {
  for (register int i = 0; i < n; i++)
    if (i < hudie[i]) swap(f[i], f[hudie[i]]);
  for (register int bit = 2; bit <= n; bit <<= 1) {
    fushu dk = dks[op][bit];
    for (register int i = 0; i < n; i += bit) {
      fushu dwg = _fushu(1, 0);
      for (register int j = i; j < i + (bit >> 1); j++) {
        fushu cjr = f[j + (bit >> 1)] * dwg;
        f[j + (bit >> 1)] = f[j] - cjr;
        f[j] = f[j] + cjr;
        dwg = dwg * dk;
      }
    }
  }
}
int p;
inline long long Int(long double n) {
  long long up = (long long)n, down = up + 1;
  if (((n - up < 0) ? -(n - up) : n - up) >
      ((n - down < 0) ? -(n - down) : n - down))
    return (down);
  return (up);
}
long long dp[2][30001][2];
int ints[43];
void ywymain() {
  int n, mx;
  cin >> n >> mx >> p;
  if (mx == 1) {
    cout << 0 << endl;
    return;
  }
  for (register int i = 1; i <= 131072; i <<= 1) {
    dks[0][i] = _fushu(cos(2 * pi / i), sin(2 * pi / i));
    dks[1][i] = _fushu(cos(2 * pi / i), -sin(2 * pi / i));
  }
  int ptr = 1;
  mx /= 2;
  while (mx) ints[ptr] = mx, ptr++, mx >>= 1;
  ptr--;
  reverse(ints + 1, ints + 1 + ptr);
  long long ans = 1, tot = 1;
  int cur = 0;
  dp[0][1][1] = dp[0][0][0] = 1;
  int k = 1;
  while (k <= n + n) k <<= 1;
  for (register int i = 0; i < k; i++)
    hudie[i] = (hudie[i >> 1] >> 1) | ((i & 1) ? (k >> 1) : 0);
  for (register int i = 2; i <= ptr; i++) {
    for (register int j = 0; j < k; j++) a[j] = b[j] = c[j] = _fushu();
    for (register int j = 0; j <= n; j++) {
      a[j] = _fushu((dp[cur][j][0] + dp[cur][j][1]) % p, 0);
      b[j] = _fushu(dp[cur][j][0] * (j != 0), 0);
      c[j] = _fushu(dp[cur][j][1] * (j != 0), 0);
    }
    fft(k, a, 0);
    fft(k, b, 0);
    fft(k, c, 0);
    for (register int j = 0; j < k; j++) {
      b[j] = a[j] * b[j];
      c[j] = a[j] * c[j];
    }
    fft(k, b, 1);
    fft(k, c, 1);
    for (register int j = 0; j <= n; j++) {
      dp[cur ^ 1][j][0 ^ (ints[i - 1] & 1)] =
          (Int(b[j].a / k) + dp[cur][j][0 ^ (ints[i - 1] & 1)]) % p;
      dp[cur ^ 1][j][1 ^ (ints[i - 1] & 1)] =
          (Int(c[j].a / k) + dp[cur][j][1 ^ (ints[i - 1] & 1)]) % p;
    }
    cur ^= 1;
    if (ints[i - 1] * 2 != ints[i]) {
      for (register int j = 0; j <= n; j++) {
        if (ints[i] & 1) {
          dp[cur ^ 1][j][0] = dp[cur][j][0];
          if (!j)
            dp[cur ^ 1][j][1] = dp[cur][j][1];
          else
            dp[cur ^ 1][j][1] =
                (dp[cur][j - 1][0] + dp[cur][j - 1][1] + dp[cur][j][1]) % p;
        } else {
          dp[cur ^ 1][j][1] = dp[cur][j][1];
          if (!j)
            dp[cur ^ 1][j][0] = dp[cur][j][0];
          else
            dp[cur ^ 1][j][0] =
                (dp[cur][j - 1][0] + dp[cur][j - 1][1] + dp[cur][j][0]) % p;
        }
      }
      cur ^= 1;
    }
    tot = 0;
    for (register int j = 1; j <= n; j += 2) tot = (tot + dp[cur][j][1]) % p;
    ans = (ans + tot) % p;
  }
  cout << ans << endl;
}
}  // namespace ywy
int main() {
  ywy::ywymain();
  return (0);
}