#include <bits/stdc++.h>
using namespace std;
int n, m, k, f[1010][150][2], p[1010], pm[1010];
void init() {
  for (int i = 1; i < 1010; ++i) {
    p[i] = (p[i - 1] * 10LL) % k;
  }
  for (int i = 1; i < 1010; ++i) {
    pm[i] = (pm[i - 1] * 10LL) % m;
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 0; i < 10; ++i) {
    f[n - 1][i % k][i > 0]++;
  }
  p[0] = 1;
  pm[0] = 1;
  init();
  for (int i = n - 2; i >= 0; --i) {
    for (int mod = 0; mod < k; ++mod) {
      for (int c = 0; c < 10; ++c) {
        for (int fl = 0; fl < 2; ++fl) {
          if (!c && !i) continue;
          int nmod = c * p[n - 1 - i] + mod;
          nmod %= k;
          if (!mod && fl) continue;
          if (!c && !fl)
            f[i][nmod][fl] = (f[i][nmod][fl] + f[i + 1][mod][fl]) % m;
          else
            f[i][nmod][1] = (f[i][nmod][1] + f[i + 1][mod][fl]) % m;
        }
      }
    }
  }
  int ans = f[0][0][1] % m;
  for (int i = 1; i < n; ++i) {
    ans = (ans + f[i][0][1] * 9LL * pm[i - 1]) % m;
  }
  printf("%d\n", ans);
  return 0;
}
