#include <bits/stdc++.h>
const int MAXN = 1e5 * 5;
const int INF = 1e9 + 7;
using namespace std;
int n, k, mmod;
void add(int &a, int b) {
  a += b;
  if (a >= mmod) a -= mmod;
}
int f[1001][101][2][2];
int mu[1001];
bool ok(int x) {
  bool ok = 0;
  int oldx = x;
  int tmp = 0;
  for (int i = 1; i <= 5; i++) {
    int dig = x % 10;
    x /= 10;
    tmp = (tmp + dig * mu[i - 1]) % k;
    if (tmp == 0) {
      ok = 1;
    }
  }
  return ok;
}
int duyet(int pos, int r, bool ok, bool greater0) {
  if (f[pos][r][ok][greater0] > -1) return f[pos][r][ok][greater0];
  if (pos == 0) return ok;
  int ans = 0;
  for (int x = (pos == 1); x <= 9; x++) {
    int new_r = (r + 1LL * mu[n - pos] * x) % k;
    int new_0 = greater0 | (x > 0);
    add(ans, duyet(pos - 1, new_r, ok | (new_r == 0 && new_0 == 1), new_0));
  }
  f[pos][r][ok][greater0] = ans;
  return ans;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> mmod;
  mu[0] = 1 % k;
  for (int i = 1; i <= 1000; i++) mu[i] = (mu[i - 1] * 10) % k;
  memset(f, -1, sizeof(f));
  cout << duyet(n, 0, 0, 0);
  return 0;
}
