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;
int const N = 70700;
double const PI = acos(-1.0);
struct comp {
  double x, y;
  comp(double x = 0, double y = 0) : x(x), y(y) {}
  comp &operator+=(comp const &a) {
    x += a.x;
    y += a.y;
    return *this;
  }
  comp &operator-=(comp const &a) {
    x -= a.x;
    y -= a.y;
    return *this;
  }
  comp &operator*=(comp const &a) {
    double z = x * a.x - y * a.y;
    y = x * a.y + y * a.x;
    x = z;
    return *this;
  }
  comp &operator/=(double a) {
    x /= a;
    y /= a;
    return *this;
  }
};
comp operator+(comp a, comp const &b) { return a += b; }
comp operator-(comp a, comp const &b) { return a -= b; }
comp operator*(comp a, comp const &b) { return a *= b; }
comp operator/(comp a, double b) { return a /= b; }
comp conj(comp const &a) { return comp(a.x, -a.y); }
int mod, sz;
int rev[N];
comp w[N];
void fft(comp *a) {
  for (int i = 0; i < sz; ++i) {
    if (i < rev[i]) {
      swap(a[i], a[rev[i]]);
    }
  }
  for (int len = 2; len <= sz; len *= 2) {
    int s = sz / len;
    for (int i = 0; i < sz; i += len) {
      for (int q = 0, j = i, k = i + len / 2; k < i + len; q += s, ++j, ++k) {
        comp c = a[k] * w[q];
        a[k] = a[j] - c;
        a[j] += c;
      }
    }
  }
}
unordered_map<int, pair<vector<comp>, vector<comp>>> ab[2];
void calc(int maxa, int par) {
  if (ab[par].find(maxa) != ab[par].end()) {
    return;
  }
  auto &ca = ab[par][maxa].first;
  auto &cb = ab[par][maxa].second;
  ca.assign(sz, 0);
  cb.assign(sz, 0);
  if (maxa == 0) {
    if (par == 0) {
      ca[0] = 1;
      fill(cb.begin(), cb.end(), 1);
    }
  } else if (maxa % 2 == 0) {
    int h = maxa / 2;
    calc(h, 0);
    calc(h, 1);
    auto &b0 = ab[0][h].second;
    auto &b1 = ab[1][h].second;
    int cpar = (par + h) % 2;
    auto &bcpar = cpar == 0 ? b0 : b1;
    for (int i = 0; i < sz; ++i) {
      cb[i] = (b0[i] + b1[i]) * bcpar[i];
    }
    for (int i = 0; i < sz; ++i) {
      ca[i] = conj(cb[i]);
    }
    fft(ca.data());
    for (int i = 0; i < sz; ++i) {
      ca[i] = conj(ca[i] / sz);
    }
    auto &a0 = ab[0][h].first;
    auto &a1 = ab[1][h].first;
    auto &acpar = ab[cpar][h].first;
    auto &apar = ab[par][h].first;
    for (int i = 0; i < sz; ++i) {
      ca[i] += apar[i];
      ca[i] -= (a0[i] + a1[i]) * acpar[0];
    }
    for (int i = 0; i < sz / 2; ++i) {
      ca[i].x = ((long long)(round(ca[i].x))) % mod;
      ca[i].y = 0;
    }
    for (int i = sz / 2; i < sz; ++i) {
      ca[i] = 0;
    }
    copy(ca.begin(), ca.end(), cb.begin());
    fft(cb.data());
  } else {
    calc(maxa - 1, par);
    auto &a1 = ab[par][maxa - 1].first;
    for (int i = 0; i < sz; ++i) {
      ca[i].x = a1[i].x;
    }
    if (maxa % 2 == par) {
      calc(maxa - 1, 1 - par);
      auto &a2 = ab[1 - par][maxa - 1].first;
      for (int i = 1; i < sz; ++i) {
        ca[i].x += a1[i - 1].x + a2[i - 1].x;
        ca[i].x = ((long long)round(ca[i].x)) % mod;
      }
    }
    for (int i = sz / 2; i < sz; ++i) {
      ca[i] = 0;
    }
    copy(ca.begin(), ca.end(), cb.begin());
    fft(cb.data());
  }
}
int main() {
  int maxn, maxa;
  cin >> maxn >> maxa >> mod;
  sz = 1;
  int logsz = 0;
  while (sz / 2 < maxn + 1) {
    sz *= 2;
    ++logsz;
  }
  rev[0] = 0;
  for (int i = 1; i < sz; ++i) {
    rev[i] = rev[i >> 1] >> 1 | (i & 1) << (logsz - 1);
  }
  for (int i = 0; i < sz; ++i) {
    double a = 2 * PI * i / sz;
    w[i] = comp(cos(a), sin(a));
  }
  int ans = 0;
  for (int z = 1; maxa >> z; ++z) {
    int curmaxa = maxa >> z;
    calc(curmaxa, 1);
    auto &a = ab[1][curmaxa].first;
    for (int n = 1; n <= maxn; n += 2) {
      long long x = round(a[n].x) + ans;
      ans = x % mod;
    }
  }
  cout << ans << '\n';
}