#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long f = 1, x = 0;
  char s = getchar();
  while (s < '0' || s > '9') {
    if (s == '-') f = -f;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = x * 10 + (s - '0');
    s = getchar();
  }
  return f * x;
}
const int jzm = 998244353;
int qkpow(int a, int b) {
  int res = 1;
  while (b > 0) {
    if (b & 1) res = res * 1ll * a % jzm;
    a = a * 1ll * a % jzm;
    b >>= 1;
  }
  return res;
}
int n, m, i, j, s, o, k;
int dp[1005][105][2];
int main() {
  n = read();
  k = read();
  m = read();
  dp[0][0][0] = 1;
  int po = 1;
  for (int i = 1; i <= n; i++) {
    for (int r = 0; r < k; r++) {
      for (int j = (i == n ? 1 : 0); j < 10; j++) {
        int pre = (r + k - po * j % k) % k;
        (dp[i][r][1] += dp[i - 1][pre][1]) %= m;
        (dp[i][r][0] += dp[i - 1][pre][0]) %= m;
        if (r == 0) {
          if (j || i > 1)
            (dp[i][r][1] += dp[i - 1][pre][0] - (j == 0 ? 1 : 0)) %= m;
          dp[i][r][0] = 1;
        }
      }
    }
    po = po * 10ll % k;
  }
  int ans = 0;
  for (int i = 0; i < k; i++) ans = (ans + dp[n][i][1]) % m;
  printf("%d\n", ans);
  return 0;
}
