#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long long int INFF = 1e17;
const double EPS = 1e-9;
const long long int MOD = 1e9 + 7;
long long int n, k, m, dp[1010][110];
long long int mod_exp(long long int b, long long int e, long long int m) {
  long long int r = 1LL;
  long long int f = 0LL;
  while (e > 0) {
    if (e & 1LL) r = (r * b) % m;
    b = (b * b) % m;
    e >>= 1LL;
  }
  return r;
}
long long int cnt(long long int a, long long int b, bool flag) {
  if (b == 0 && flag)
    return (a != n ? ((9 % m) * mod_exp(10, n - a - 1, m)) % (long long int)m
                   : 1);
  if (a == n) return 0;
  if (dp[a][b] != -1) return dp[a][b];
  dp[a][b] = 0;
  for (int i = 0; i <= 9; i++) {
    if (!flag && !i)
      dp[a][b] = (dp[a][b] +
                  (long long int)cnt(
                      a + 1, (b + ((i % k) * mod_exp(10, a, k)) % k) % k, 0)) %
                 m;
    else
      dp[a][b] = (dp[a][b] +
                  (long long int)cnt(
                      a + 1, (b + ((i % k) * mod_exp(10, a, k)) % k) % k, 1)) %
                 m;
  }
  return dp[a][b];
}
int main() {
  cin >> n >> k >> m;
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= k; j++) dp[i][j] = -1;
  cnt(0, 0, 0);
  printf("%d\n", dp[0][0]);
  ;
  return 0;
}
