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;
struct comp {
  double x, y;
} a[65600], b[65600], c[65600], fft[65600], tp[17][65600];
double pi = acos(-1.0);
comp operator+(comp a, comp b) { return (comp){a.x + b.x, a.y + b.y}; }
comp operator-(comp a, comp b) { return (comp){a.x - b.x, a.y - b.y}; }
comp operator*(comp a, comp b) {
  return (comp){a.x * b.x - a.y * b.y, a.y * b.x + b.y * a.x};
}
comp operator/(comp a, double b) { return (comp){a.x / b, a.y / b}; }
int rev[65600], n, m, p, s[65600][2], as;
void dft(int s, comp *a, int t) {
  for (int i = 0; i < s; i++)
    rev[i] = (rev[i >> 1] >> 1) + (i & 1) * (s >> 1), fft[rev[i]] = a[i];
  for (int l = 2, lg = 1; l <= s; l <<= 1, lg++)
    for (int j = 0; j < s; j += l)
      for (int k = j; k < j + (l >> 1); k++) {
        comp sp = tp[lg][k - j];
        if (t == -1) sp.y *= -1;
        comp tp1 = fft[k], tp2 = fft[k + (l >> 1)] * sp;
        fft[k] = tp1 + tp2, fft[k + (l >> 1)] = tp1 - tp2;
      }
  int inv = t == -1 ? s : 1;
  for (int i = 0; i < s; i++) a[i] = fft[i] / inv;
}
void solve(int x) {
  if (x == 0) return;
  if (x == 1) {
    s[1][1] = 1;
    as = 1;
    return;
  }
  int tp = x / 2;
  solve(tp);
  int l = 1;
  while (l <= n * 2 + 1) l <<= 1;
  for (int i = 0; i < l; i++)
    a[i].x = a[i].y = b[i].x = b[i].y = c[i].x = c[i].y = 0;
  for (int i = 1; i <= n; i++) a[i].x = s[i][0], b[i].x = s[i][1];
  dft(l, a, 1), dft(l, b, 1);
  for (int i = 0; i < l; i++) c[i] = (a[i] + b[i] + (comp){1, 0}) * a[i];
  dft(l, c, -1);
  for (int i = 1; i <= n; i++)
    s[i][tp & 1] = (s[i][tp & 1] + (long long)(c[i].x + 0.1)) % p;
  for (int i = 0; i < l; i++) c[i] = (a[i] + b[i] + (comp){1, 0}) * b[i];
  dft(l, c, -1);
  for (int i = 1; i <= n; i++)
    s[i][~tp & 1] = ((long long)(c[i].x + 0.1) + s[i][~tp & 1]) % p;
  if (x & 1)
    for (int i = n; i > 1; i--)
      s[i][1] = (s[i][1] + s[i - 1][1] + s[i - 1][0]) % p;
  if (x & 1) s[1][1] = (s[1][1] + 1) % p;
  for (int i = 1; i <= n; i += 2) as = (as + s[i][1]) % p;
}
void init() {
  for (int i = 1; i < 17; i++)
    for (int j = 0; j < 1 << i; j++)
      tp[i][j] = (comp){cos(2 * pi / (1 << i) * j), sin(2 * pi / (1 << i) * j)};
}
int main() {
  scanf("%d%d%d", &n, &m, &p);
  init();
  solve(m / 2);
  printf("%d\n", as);
}