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;
class test_data_generation {
  int max_n, max_a, q, fft_size, *bit_reversal, *f[2], test_cases;
  class complex_t : public complex<double>{
    public : complex_t(double r = 0, double i = 0){real(r);
  imag(i);
} int set(double r = 0, double i = 0) {
  real(r);
  imag(i);
  return 1;
}
complex_t &operator=(const complex<double> &z) {
  real(z.real());
  imag(z.imag());
  return *this;
}
}
*root, *d[3];
complex_t *new_fft_block() { return new complex_t[fft_size]; }
void fft_0(complex_t *a) {
  for (int i = 0; i < fft_size; ++i) {
    int j = bit_reversal[i];
    if (i < j) swap(a[i], a[j]);
  }
  complex_t e;
  for (int k = 1, l = 2; k < fft_size; k = l, l <<= 1)
    for (int s = 0; s < fft_size; s += l)
      for (int i = 0, j = s, m = k, n = j + k; i < k; ++i, ++j, ++m, ++n)
        e = root[m] * a[n], a[n] = a[j] - e, a[j] += e;
}
void fft_1(complex_t *a) {
  reverse(a + 1, a + fft_size);
  fft_0(a);
}
void update(int &f1, complex_t &d1, int f2, long long w) {
  int u = ((long long)(d1.real() / fft_size + 0.5) + f1) % q;
  u += q, u -= w * f2 % q, f1 = u % q;
}
void solve(int k) {
  if (k == 0) {
    f[0][0] = 1;
    return;
  }
  int l = k / 2;
  solve(l);
  for (int i = max_n + 1; i < fft_size; ++i)
    d[0][i].set(), d[1][i].set(), d[2][i].set();
  int b = l & 1, b1 = b ^ 0, b2 = b ^ 1;
  for (int i = 0; i <= max_n; ++i)
    d[0][i].set(f[0][i] + f[1][i]), d[1][i].set(f[b1][i]),
        d[2][i].set(f[b2][i]);
  fft_0(d[0]);
  fft_0(d[1]);
  fft_0(d[2]);
  for (int i = 0; i < fft_size; ++i) d[1][i] *= d[0][i], d[2][i] *= d[0][i];
  fft_1(d[1]);
  fft_1(d[2]);
  for (int i = max_n; i >= 0; --i) {
    long long w = (long long)(f[0][i] + f[1][i]) % q;
    update(f[0][i], d[1][i], f[b1][0], w);
    update(f[1][i], d[2][i], f[b2][0], w);
  }
  if (k & 1)
    for (int i = max_n, j = i - 1; i > 0; --i, --j)
      f[1][i] += f[0][j] + f[1][j], f[1][i] %= q;
  for (int i = 1; i <= max_n; i += 2) test_cases += f[1][i], test_cases %= q;
}

public:
test_data_generation() : fft_size(1), test_cases(0) {
  cin >> max_n >> max_a >> q;
  int p = 2 * max_n + 1, tl = 0;
  while (fft_size < p) fft_size <<= 1, ++tl;
  p = max_n + 1, bit_reversal = new int[fft_size], root = new_fft_block();
  d[0] = new_fft_block(), d[1] = new_fft_block(), d[2] = new_fft_block();
  for (int j = 0; j < 2; ++j) {
    f[j] = new int[p];
    for (int i = 0; i <= max_n; ++i) f[j][i] = 0;
  }
  for (int i = 0; i < fft_size; ++i) bit_reversal[i] = 0;
  for (int i = 1, l, r; i < fft_size; bit_reversal[i++] = l | r)
    l = bit_reversal[i >> 1] >> 1, r = (i & 1) << (tl - 1);
  int b_size = fft_size >> 1;
  double theta, delta = 2 * acos(-1.0) / fft_size;
  for (int i = 0, j = b_size; i < b_size; ++i, ++j)
    theta = delta * i, root[j].set(cos(theta), sin(theta));
  for (int i = b_size - 1, j = i << 1; i > 0; --i, --j, --j) root[i] = root[j];
}
void solve() { solve(max_a / 2); }
void output_solution() { cout << test_cases; }
}
;
int main() {
  test_data_generation problem;
  problem.solve();
  problem.output_solution();
}