#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
int n, k, m, f[maxn][105][2], Pow[1005];
int dfs(int p, int rem, bool flag) {
  if (p == 0) {
    if (flag)
      return 1;
    else
      return 0;
  }
  if (f[p][rem][flag] != -1) return f[p][rem][flag];
  int sum = 0;
  for (int i = 0; i <= 9; i++) {
    if (p == 1 and i == 0) continue;
    if ((i * Pow[n - p] % k + rem) % k == 0 and i != 0)
      sum = (sum + dfs(p - 1, 0, true)) % m;
    else
      sum = (sum + dfs(p - 1, (i * Pow[n - p] % k + rem) % k, flag)) % m;
  }
  f[p][rem][flag] = sum;
  return sum;
}
int main() {
  scanf("%d%d%d", &n, &k, &m);
  memset(f, -1, sizeof(f));
  Pow[0] = 1;
  for (int i = 1; i <= n; i++) Pow[i] = Pow[i - 1] * 10 % k;
  printf("%d", dfs(n, 0, false));
  return 0;
}
