#include <bits/stdc++.h>
using namespace std;
const long long N = 1005;
long long n, k, Mod, ans = 0;
long long pow_10[N], f[N][105][2];
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void Pre() {
  pow_10[0] = 1;
  for (long long i = 1; i <= n; i++) pow_10[i] = (pow_10[i - 1] * 10) % k;
}
inline void PRINT3() {
  ans = 0;
  for (long long i = 0; i <= k - 1; i++) ans = (ans + f[n][i][1]) % Mod;
  printf("%lld\n", ans);
}
inline void PRINT2() { PRINT3(); }
inline void PRINT1() { PRINT2(); }
signed main() {
  n = read(), k = read(), Mod = read();
  Pre();
  f[0][0][0] = 1;
  for (long long i = 0; i <= n - 1; i++)
    for (long long j = 0; j <= k - 1; j++) {
      long long lim;
      if (i == n - 1)
        lim = 1;
      else
        lim = 0;
      for (long long l = lim; l <= 9; l++) {
        long long Now = (j + pow_10[i] * l) % k;
        if ((l) && (Now == 0))
          f[i + 1][Now][1] = (f[i + 1][Now][1] + f[i][j][0]) % Mod;
        else
          f[i + 1][Now][0] = (f[i + 1][Now][0] + f[i][j][0]) % Mod;
        f[i + 1][Now][1] = (f[i + 1][Now][1] + f[i][j][1]) % Mod;
      }
    }
  PRINT1();
  return 0;
}
