#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1010;
long long f[maxn][110][2][2][2], mod, jie[maxn];
long long n, k;
long long dfs(long long dep, long long sum, long long t1, long long t2,
              long long t3) {
  if (dep == n + 1) {
    if (!t3) return 0;
    if (t2) {
      return 1;
    }
    if (t1 && sum == 0) {
      return 1;
    }
    return 0;
  }
  if (f[dep][sum][t1][t2][t3] != -1) return f[dep][sum][t1][t2][t3];
  long long res = 0;
  for (long long i = 0; i <= 9; i++) {
    if (t2 || (sum == 0 && t1))
      (res += dfs(dep + 1, 0, 0, 1, i == 0 ? 0 : 1)) %= mod;
    else
      (res += dfs(dep + 1, (sum + 1LL * i * jie[dep - 1] % k) % k, t1 || i != 0,
                  0, i == 0 ? 0 : 1)) %= mod;
  }
  return f[dep][sum][t1][t2][t3] = res;
}
int main() {
  scanf("%lld%lld%lld", &n, &k, &mod);
  memset(f, -1, sizeof(f));
  jie[0] = 1;
  for (long long i = 1; i < maxn; i++) jie[i] = 1LL * jie[i - 1] * 10 % k;
  printf("%lld\n", dfs(1, 0, 0, 0, 0));
  return 0;
}
