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>
const int maxn = 3e4 + 100, maxmod = 1e5 + 200;
int mod, ans, n, p[10], q[10], m[10], a[maxn][10], b[maxn][10], r[maxn][10],
    inv[maxmod][10], res[maxn][10], E[10], I[10], EI[10];
void ext_gcd(int x, int y, int &a, int &b, int mod) {
  if (!y) {
    a = 1;
    b = 0;
    return;
  }
  ext_gcd(y, x % y, b, a, mod);
  b = (-1ll * (x / y) * a + b) % mod;
  return;
}
int INV(int x, int mod) {
  int a, b;
  ext_gcd(x, mod, a, b, mod);
  return ((a % mod) + mod) % mod;
}
int pow_mod(int x, long long n, int mod) {
  int y = 1;
  while (n) {
    if (n & 1) {
      y = 1ll * x * y % mod;
    }
    n >>= 1;
    x = 1ll * x * x % mod;
  }
  return y;
}
void decomp() {
  int x = mod;
  for (int y = 2; y * y <= x; ++y) {
    if (x % y == 0) {
      p[n] = y;
      while (x % y == 0) {
        ++q[n];
        x /= y;
      }
      ++n;
    }
  }
  if (x > 1) {
    p[n] = x;
    q[n++] = 1;
  }
  for (int i = 0; i < n; ++i) {
    m[i] = pow_mod(p[i], q[i], mod + 1);
    for (int x = 0; x < m[i]; ++x) {
      inv[x][i] = INV(x, m[i]);
    }
    E[i] = mod / m[i];
    I[i] = inv[E[i] % m[i]][i];
    EI[i] = 1ll * E[i] * I[i] % mod;
  }
  return;
}
void inc(int x, int *a, int *b) {
  for (int i = 0; i < n; ++i) {
    int T = x;
    while (T % p[i] == 0) {
      T /= p[i];
      ++a[i];
    }
    b[i] = 1ll * T * b[i] % m[i];
  }
  return;
}
void dec(int x, int *a, int *b) {
  for (int i = 0; i < n; ++i) {
    int T = x;
    while (T % p[i] == 0) {
      T /= p[i];
      --a[i];
    }
    b[i] = 1ll * inv[T % m[i]][i] * b[i] % m[i];
  }
  return;
}
void calc(int *a, int *b, int *r) {
  for (int i = 0; i < n; ++i) {
    r[i] = 1ll * pow_mod(p[i], a[i], m[i]) * b[i] % m[i];
  }
  return;
}
void calc2(int N, int mod_i) {
  for (int i = 0; i < N; ++i) {
    if (i + q[mod_i] >= N) {
      int x = r[i][mod_i];
      if (i) {
        x -= res[i - 1][mod_i];
      }
      ((x %= m[mod_i]) += m[mod_i]) %= m[mod_i];
      res[i][mod_i] = x >> 1;
    } else {
      res[i][mod_i] = 0;
      for (int j = 1, t = 1, f = 1; j <= q[mod_i]; ++j, t <<= 1, f = -f) {
        res[i][mod_i] =
            (1ll * f * t * r[i + j][mod_i] + res[i][mod_i]) % m[mod_i];
      }
      (res[i][mod_i] += m[mod_i]) %= m[mod_i];
    }
  }
  return;
}
int div2(int x, int mod) {
  ((x %= mod) += mod) %= mod;
  return x & 1 ? x + mod >> 1 : x >> 1;
}
void calc(int N, int mod_i) {
  res[0][mod_i] = div2(r[0][mod_i], m[mod_i]);
  for (int i = 1; i < N; ++i) {
    res[i][mod_i] = div2(r[i][mod_i] - res[i - 1][mod_i], m[mod_i]);
  }
  return;
}
int CRT(int *r) {
  int x = 0;
  for (int i = 0; i < n; ++i) {
    x = (1ll * EI[i] * r[i] + x) % mod;
  }
  return x;
}
void solve(int N, int M) {
  N += q[0];
  M += 2;
  for (int i = 0; i < n; ++i) {
    int T = M;
    a[0][i] = 0;
    while (T % p[i] == 0) {
      T /= p[i];
      ++a[0][i];
    }
    b[0][i] = T % m[i];
  }
  for (int i = 1; i < N; ++i) {
    if (i == M) {
      for (int j = i; j < N; ++j) {
        memset(a[j], 0, sizeof(int) * n);
        memset(b[j], 0, sizeof(int) * n);
      }
      break;
    }
    memcpy(a[i], a[i - 1], sizeof(int) * n);
    memcpy(b[i], b[i - 1], sizeof(int) * n);
    inc(M - i, a[i], b[i]);
    dec(i + 1, a[i], b[i]);
  }
  for (int i = 0; i < N; ++i) {
    calc(a[i], b[i], r[i]);
  }
  for (int i = 0; i < n; ++i) {
    if (p[i] == 2) {
      calc2(N, i);
    } else {
      calc(N, i);
    }
  }
  N -= q[0];
  for (int i = 0; i < N; ++i) {
    if (~i & 1) {
      (ans += CRT(res[i])) %= mod;
    }
  }
  return;
}
int main() {
  int N, A;
  scanf("%d%d%d", &N, &A, &mod);
  decomp();
  for (int g = 2; g <= A; g <<= 1) {
    int M = A / g - 1;
    if (M & 1) {
      --M;
    }
    solve(N, M);
  }
  printf("%d\n", ans);
  return 0;
}