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;
using ll = long long;
using ld = long double;
using D = double;
using uint = unsigned int;
template <typename T>
using pair2 = pair<T, T>;
const long double pi = acos((ld)-1.0);
const int maxn = 1 << 16;
complex<double> oddc[maxn], evenc[maxn], tmp[maxn];
complex<double> w[maxn], invw[maxn];
ll odd[maxn], even[maxn];
int oldodd[maxn], oldeven[maxn];
int btr[maxn];
int n, A, mod;
int st2;
int answer;
inline int bitrev(int x) { return btr[x]; }
void fft(complex<double> *a, int n, complex<double> *w, complex<double> *res) {
  for (int i = 0; i < n; i++) res[bitrev(i)] = a[i];
  for (int len = 2; len <= n; len *= 2) {
    int step = n / len;
    for (int i = 0; i < n; i += len) {
      int curw = 0;
      for (int j = 0; j < len / 2; j++) {
        complex<double> x = res[i + j];
        complex<double> y = res[i + len / 2 + j] * w[curw];
        res[i + j] = x + y;
        res[i + len / 2 + j] = x - y;
        curw += step;
      }
    }
  }
}
void preparefft(int n) {
  for (int i = 0; i < n; i++) {
    int cur = i;
    for (int j = 0; (1 << j) < n; j++) {
      btr[i] = (btr[i] << 1) | (cur & 1);
      cur >>= 1;
    }
  }
  for (int i = 0; i < n; i++) {
    w[i] = complex<double>(cos(2 * pi / n * i), sin(2 * pi / n * i));
    invw[i] = w[i];
  }
  reverse(invw + 1, invw + n);
}
void conv(ll *from, complex<double> *to) {
  for (int i = n + 1; i < st2; i++) tmp[i] = 0;
  for (int i = 0; i <= n; i++) tmp[i] = from[i];
  fft(tmp, st2, w, to);
}
void convback(complex<double> *from, ll *to) {
  fft(from, st2, invw, tmp);
  for (int i = 0; i < st2; i++) tmp[i] /= st2;
  for (int i = 0; i <= n; i++) {
    to[i] = (ll)(tmp[i].real() + 0.5);
    assert(abs(tmp[i].imag()) < 0.1);
  }
}
void addans() {
  for (int i = 1; i <= n; i += 2) answer = (answer + odd[i]) % mod;
}
void go(int A) {
  if (A == 1) {
    even[0] = 1;
    odd[0] = 0;
    odd[1] = 1;
    addans();
    return;
  }
  go(A / 2);
  for (int i = 0; i <= n; i++) oldodd[i] = odd[i];
  for (int i = 0; i <= n; i++) oldeven[i] = even[i];
  conv(even, evenc);
  conv(odd, oddc);
  for (int i = 0; i < st2; i++) {
    if ((A / 2) % 2 == 0) {
      tie(oddc[i], evenc[i]) =
          make_pair((oddc[i] + evenc[i]) * oddc[i],
                    (oddc[i] + evenc[i]) * (evenc[i] - (complex<double>)1));
    } else {
      tie(evenc[i], oddc[i]) =
          make_pair((oddc[i] + evenc[i]) * oddc[i],
                    (oddc[i] + evenc[i]) * (evenc[i] - (complex<double>)1));
    }
  }
  convback(oddc, odd);
  convback(evenc, even);
  for (int i = n + 1; i <= 2 * n; i++) {
    odd[i] = 0;
    even[i] = 0;
  }
  for (int i = 0; i <= n; i++) {
    odd[i] = (odd[i] + oldodd[i]) % mod;
    even[i] = (even[i] + oldeven[i]) % mod;
  }
  if (A % 2 == 1) {
    for (int i = n; i >= 1; i--) {
      odd[i] = (odd[i] + odd[i - 1] + even[i - 1]) % mod;
    }
  }
  addans();
}
int main() {
  cin >> n >> A >> mod;
  if (A == 1) {
    cout << 0 << endl;
    return 0;
  }
  st2 = 0;
  while ((1 << st2) <= n) st2++;
  st2++;
  st2 = 1 << st2;
  preparefft(st2);
  go(A / 2);
  cout << answer << endl;
  return 0;
}