#include <bits/stdc++.h>
using namespace std;
int n, k, m, P10[1005], Mem[2][1005][1005], i, j;
int pu(int a, int b) {
  int rez = 1, i;
  for (i = 0; (1 << i) <= b; i++) {
    if ((1 << i) & b) rez = (1LL * rez * a) % m;
    a = (1LL * a * a) % m;
  }
  return rez;
}
int solve(int ok, int nr, int rest) {
  if (rest == 0 && ok) {
    if (nr == n) return 1;
    return (9LL * pu(10, n - nr - 1)) % m;
  }
  if (nr == n) return 0;
  if (Mem[ok][nr][rest] != -1) return Mem[ok][nr][rest];
  int i;
  Mem[ok][nr][rest] = solve(ok, nr + 1, rest);
  for (i = 1; i <= 9; i++)
    Mem[ok][nr][rest] =
        (Mem[ok][nr][rest] +
         solve(1, nr + 1, (1LL * rest + 1LL * P10[nr] * i) % k)) %
        m;
  return Mem[ok][nr][rest];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k >> m;
  P10[0] = 1;
  for (i = 1; i <= n; i++) P10[i] = (P10[i - 1] * 10LL) % k;
  for (i = 0; i <= n; i++)
    for (j = 0; j < k; j++) Mem[0][i][j] = Mem[1][i][j] = -1;
  cout << solve(0, 0, 0) << "\n";
  return 0;
}
