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;
long long spf[31];
long long fac[31];
void sieve() {
  spf[1] = 1;
  for (long long i = 2; i < 31; i++) spf[i] = i;
  for (long long i = 4; i < 31; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < 31; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j < 31; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
map<long long, long long> getfactor(long long a) {
  map<long long, long long> m;
  while (a > 1) {
    m[spf[a]]++;
    a /= spf[a];
  }
  return m;
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long inverse(long long a, long long p) { return power(a, p - 2, p); }
long long ncr(long long n, long long r, long long p) {
  if (r > n) return 0;
  if (r == 0) return 1;
  return (fac[n] * inverse(fac[r], p) % p * inverse(fac[n - r], p) % p) % p;
}
void solve() {
  long long n, m, k;
  cin >> n >> k >> m;
  long long dp1[n + 2];
  memset(dp1, 0, sizeof(dp1));
  long long dp[n + 2][k];
  memset(dp, 0, sizeof(dp));
  dp1[n] = 1;
  for (long long i = n - 1; i >= 1; i--) {
    dp1[i] = (dp1[i + 1] * 10ll) % k;
  }
  long long ans = 0;
  for (long long i = n; i >= 2; i--) {
    for (long long j = 1; j <= 9; j++) {
      long long dig = (j * dp1[i]) % k;
      for (long long l = 0; l < k; l++) {
        dp[i][(dig + l) % k] = (dp[i][(dig + l) % k] + dp[i + 1][l]) % m;
      }
      dp[i][dig] = (dp[i][dig] + 1) % m;
    }
    ans = (ans + (dp[i][0] % m * power(10, i - 2, m) * 9ll) % m) % m;
    ans = ans % m;
    for (long long l = 0; l < k; l++) {
      dp[i][l] = (dp[i][l] + dp[i + 1][l]) % m;
    }
    dp[i][0] = 0;
  }
  for (long long j = 1; j <= 9; j++) {
    long long dig = (j * dp1[1]) % k;
    for (long long l = 0; l < k; l++) {
      dp[1][(dig + l) % k] = (dp[1][(dig + l) % k] + dp[1 + 1][l]) % m;
    }
    dp[1][dig] = (dp[1][dig] + 1) % m;
  }
  ans = ans + (dp[1][0]) % m;
  ans = ans % m;
  cout << ans % m << '\n';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long test = 1;
  while (test--) {
    solve();
  }
}
