#include <bits/stdc++.h>
using namespace std;
int n, k;
long long m;
long long dp[1111][111][2], mul[1111], mulm[1111];
long long dfs(int cur, int rest, int e) {
  long long &ans = dp[cur][rest][e];
  if (ans != -1) return ans;
  ans = 0;
  if (cur == n + 1) return ans;
  int st = 0;
  if (cur == n) st = 1;
  for (int i = st; i < 10; ++i) {
    int nxt = (rest + mul[cur - 1] * i) % k;
    int f = 0;
    if (e && i == 0) f = 1;
    if (nxt == 0 && !f) {
      int tmp = n - cur - 1;
      if (tmp < 0)
        ans = (ans + 1) % m;
      else
        ans = (ans + mulm[tmp] * 9 % m) % m;
    } else
      ans = (ans + dfs(cur + 1, nxt, f)) % m;
  }
  return ans;
}
int main() {
  while (~scanf("%d%d%I64d", &n, &k, &m)) {
    memset(dp, -1, sizeof(dp));
    mulm[0] = mul[0] = 1;
    for (int i = 1; i <= n; ++i)
      mul[i] = mul[i - 1] * 10 % k, mulm[i] = mulm[i - 1] * 10 % m;
    printf("%I64d\n", dfs(1, 0, 1));
  }
}
