#include <bits/stdc++.h>
using namespace std;
const int iinf = 0x3f3f3f3f;
const long long linf = 0x3f3f3f3f3f3f3f3f;
const int N = 1000, K = 100;
int n, k, mod, ten[N];
int f[N + 1][K][3], ans;
void trans(int i, int j, int d) {
  if (d == 0) {
    (f[i + 1][j][0] += f[i][j][0]) %= mod;
    (f[i + 1][j][1] += f[i][j][1]) %= mod;
    (f[i + 1][j][2] += f[i][j][2]) %= mod;
  } else {
    int J = (ten[i] * d % k + j) % k;
    (f[i + 1][J][1 + (J == 0)] += f[i][j][0]) %= mod;
    (f[i + 1][J][1 + (J == 0)] += f[i][j][1]) %= mod;
    (f[i + 1][J][2] += f[i][j][2]) %= mod;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
  cin >> n >> k >> mod;
  ten[0] = 1;
  for (int i = (1), I = (n); i < I; i++) ten[i] = 10ll * ten[i - 1] % k;
  f[0][0][0] = 1;
  for (int i = (0), I = (n - 1); i < I; i++)
    for (int j = (0), I = (k); j < I; j++)
      for (int d = (0), I = (10); d < I; d++) trans(i, j, d);
  for (int j = (0), I = (k); j < I; j++)
    for (int d = (1), I = (10); d < I; d++) trans(n - 1, j, d);
  for (int j = (0), I = (k); j < I; j++) (ans += f[n][j][2]) %= mod;
  cout << ans << '\n';
  return 0;
}
