#include <bits/stdc++.h>
using namespace std;
const int maxn = 1010;
int n, k, m;
int p10[maxn];
inline void init() {
  p10[0] = 1;
  for (register int i = 1; i <= 1000; i++) {
    p10[i] = (p10[i - 1] * 10) % k;
  }
}
long long f[1010][110][2];
long long dfs(long long pos, long long statu, bool fg) {
  if (pos == n + 1) {
    if (fg) return 1;
    return 0;
  }
  if (~f[pos][statu][fg]) {
    return f[pos][statu][fg];
  }
  long long ans = 0;
  if (pos != n) ans += dfs(pos + 1, statu, fg);
  for (register int i = 1; i <= 9; i++) {
    ans += dfs(pos + 1, (statu + i * p10[pos - 1]) % k,
               fg || (!((statu + i * p10[pos - 1]) % k)));
    ans %= m;
  }
  f[pos][statu][fg] = ans;
  return ans;
}
int main() {
  memset(f, -1, sizeof(f));
  scanf("%d%d%d", &n, &k, &m);
  init();
  printf("%lld\n", dfs(1, 0, 0));
  return 0;
}
