Amr doesn't like Maths as he finds it really boring, so he usually sleeps in Maths lectures. But one day the teacher suspected that Amr is sleeping and asked him a question to make sure he wasn't.

First he gave Amr two positive integers n and k. Then he asked Amr, how many integer numbers x > 0 exist such that:

  * Decimal representation of x (without leading zeroes) consists of exactly n digits; 
  * There exists some integer y > 0 such that: 
    * <image>; 
    * decimal representation of y is a suffix of decimal representation of x. 



As the answer to this question may be pretty huge the teacher asked Amr to output only its remainder modulo a number m.

Can you help Amr escape this embarrassing situation?

Input

Input consists of three integers n, k, m (1 ≤ n ≤ 1000, 1 ≤ k ≤ 100, 1 ≤ m ≤ 109).

Output

Print the required number modulo m.

Examples

Input

1 2 1000


Output

4

Input

2 2 1000


Output

45

Input

5 3 1103


Output

590

Note

A suffix of a string S is a non-empty string that can be obtained by removing some number (possibly, zero) of first characters from S.
#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const double E = exp(1);
template <class T1>
void deb(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
template <typename T>
inline T sqr(T n) {
  return n * n;
}
inline double hypot(double x, double y) { return sqrt(sqr(x) + sqr(y)); }
template <typename T>
inline T pmod(T n, T m) {
  return ((n % m) + m) % m;
}
template <typename T>
T power(T n, int p) {
  return (p == 0) ? (T)(1) : (sqr(power(n, p >> 1)) * ((p & 1) * (n - 1) + 1));
}
template <typename T>
T bigmod(T n, int p, T m) {
  return (p == 0)
             ? (T)(1)
             : ((sqr(bigmod(n, p >> 1, m)) % m) * ((p & 1) * (n - 1) % m + 1)) %
                   m;
}
long long dp[1001][101][2];
bool vis[1001][101][2];
int n;
int pwr[10001];
int k, mod;
long long rec(int pos, int sum, int flag) {
  if (pos == 0) {
    return sum == 0;
  }
  long long &ret = dp[pos][sum][flag];
  bool &vv = vis[pos][sum][flag];
  if (vv == 1) return ret;
  vv = 1;
  ret = 0;
  int st = 0;
  if (pos == 1) st = 1;
  for (int i = st; i <= 9; i++) {
    int new_mod_value = ((pwr[n - pos] * i) + sum) % k;
    int nflag = !(i || !flag);
    if (flag == 0) {
      if (sum == 0) {
        ret += rec(pos - 1, 0, 0);
        ret %= mod;
      } else {
        ret += rec(pos - 1, new_mod_value, 0);
        ret %= mod;
      }
    } else {
      ret += rec(pos - 1, new_mod_value, nflag);
      ret %= mod;
    }
  }
  return ret;
}
int main() {
  while (scanf("%d %d %d", &n, &k, &mod) == 3) {
    memset(vis, 0, sizeof(vis));
    pwr[0] = 1;
    for (int i = 1; i <= n; ++i) pwr[i] = (pwr[i - 1] * 10) % k;
    printf("%I64d\n", rec(n, 0, 1));
  }
  return 0;
}
