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;
namespace fastIO1 {
inline char read() {
  static const int IN_LEN = 1000000;
  static char buf[IN_LEN], *s, *t;
  return (s == t               ? t = (s = buf) + fread(buf, 1, IN_LEN, stdin),
          (s == t ? -1 : *s++) : *s++);
}
template <class T>
inline void read(T &x) {
  static bool iosig;
  static char c;
  for (iosig = false, c = read(); !isdigit(c); c = read()) {
    if (c == '-') iosig = true;
    if (c == -1) return;
  }
  for (x = 0; isdigit(c); c = read()) x = ((x + (x << 2)) << 1) + (c ^ '0');
  if (iosig) x = -x;
}
inline char readc(char &c) {
  for (c = read(); !isalpha(c) && !isdigit(c); c = read())
    if (c == -1) return 0;
}
const int OUT_LEN = 10000000;
char obuf[OUT_LEN], *ooh = obuf;
inline void print(char c) {
  if (ooh == obuf + OUT_LEN) fwrite(obuf, 1, OUT_LEN, stdout), ooh = obuf;
  *ooh++ = c;
}
template <class T>
inline void print(T x) {
  static int buf[30], cnt;
  if (x == 0)
    print('0');
  else {
    if (x < 0) print('-'), x = -x;
    for (cnt = 0; x; x /= 10) buf[++cnt] = x % 10 + 48;
    while (cnt) print((char)buf[cnt--]);
  }
}
inline void flush() { fwrite(obuf, 1, ooh - obuf, stdout); }
}  // namespace fastIO1
namespace fastIO2 {
template <class T>
inline void read(T &x) {
  static bool iosig;
  static char c;
  for (iosig = false, c = getchar(); !isdigit(c); c = getchar()) {
    if (c == '-') iosig = true;
    if (c == -1) return;
  }
  for (x = 0; isdigit(c); c = getchar()) x = ((x + (x << 2)) << 1) + (c ^ '0');
  if (iosig) x = -x;
}
}  // namespace fastIO2
using namespace fastIO1;
const long double pi = acos(-1);
struct Complex {
  long double a, b;
  Complex() { a = b = 0; }
  Complex(long double x, long double y) { a = x, b = y; }
  Complex operator*(Complex &y) {
    Complex res;
    res.a = a * y.a - b * y.b, res.b = a * y.b + b * y.a;
    return res;
  }
  Complex operator+(Complex &y) {
    Complex res;
    res.a = a + y.a, res.b = b + y.b;
    return res;
  }
  Complex operator-(Complex &y) {
    Complex res;
    res.a = a - y.a, res.b = b - y.b;
    return res;
  }
} a[(262200)], b[(262200)];
int n, len, Lim = 1, rev[(262200)];
long long f0[(262200)], f1[(262200)], t0[(262200)], t1[(262200)], ans, m, P;
void init(int L) {
  for (len = 0; Lim <= L + L; Lim <<= 1) len++;
  for (int i = 0; i < Lim; i++)
    rev[i] = (rev[i >> 1] >> 1) | ((i & 1) << (len - 1));
}
void FFT(Complex *a, int tp) {
  for (int i = 0; i < Lim; i++)
    if (i < rev[i]) swap(a[i], a[rev[i]]);
  for (int pos = 1; pos < Lim; pos <<= 1) {
    Complex w;
    w.a = cos(pi / pos), w.b = tp * sin(pi / pos);
    for (int R = pos << 1, j = 0; j < Lim; j += R) {
      Complex p;
      p.a = 1, p.b = 0;
      for (int k = j; k < pos + j; k++, p = p * w) {
        Complex x = a[k], y = p * a[k + pos];
        a[k] = x + y, a[k + pos] = x - y;
      }
    }
  }
  if (tp == -1)
    for (int i = 0; i < Lim; i++) a[i].a = (a[i].a / Lim);
}
void solve() {
  f0[0] = 1;
  long long now = 0;
  for (int k = 30; k; k--) {
    for (int i = 0; i <= n; i++)
      a[i] = Complex(f0[i], 0), b[i] = Complex((f0[i] + f1[i]) % P, 0);
    for (int i = n + 1; i < Lim; i++) a[i] = b[i] = Complex(0, 0);
    FFT(a, 1), FFT(b, 1);
    for (int i = 0; i < Lim; i++) a[i] = a[i] * b[i];
    FFT(a, -1);
    for (int i = 0; i <= n; i++)
      if (now & 1)
        t1[i] = ((long long)round(a[i].a) % P - f0[i] + P) % P;
      else
        t0[i] = ((long long)round(a[i].a) % P - f1[i] + P) % P;
    for (int i = 0; i <= n; i++) a[i] = Complex(f1[i], 0);
    for (int i = n + 1; i < Lim; i++) a[i] = Complex(0, 0);
    FFT(a, 1);
    for (int i = 0; i < Lim; i++) a[i] = a[i] * b[i];
    FFT(a, -1);
    for (int i = 0; i <= n; i++)
      if (now & 1)
        t0[i] = ((long long)round(a[i].a) % P + f0[i]) % P;
      else
        t1[i] = ((long long)round(a[i].a) % P + f1[i]) % P;
    for (int i = 0; i <= n; i++) f0[i] = t0[i], f1[i] = t1[i];
    now <<= 1;
    if (m & (1 << k)) {
      for (int i = n; i; i--) (f1[i] += f0[i - 1] + f1[i - 1]) %= P;
      now |= 1;
    }
    for (int i = 1; i <= n; i += 2) (ans += f1[i]) %= P;
  }
}
int main() {
  read(n), read(m), read(P), init(n);
  solve(), cout << ans;
}