#include <bits/stdc++.h>
using namespace std;
long long dp[1001][101][2];
long long n, k, mod;
long long powers[1001], powers2[1001];
long long add(long long a, long long b) {
  return ((a % mod) + (b % mod)) % mod;
}
long long mul(long long a, long long b) {
  return ((a % mod) * (b % mod)) % mod;
}
void gen() {
  powers[0] = 1LL;
  for (long long i = 1; i <= 1000; i++) {
    powers[i] = mul(powers[i - 1], 10LL);
  }
  powers2[0] = 1LL;
  for (long long i = 1; i <= 1000; i++) {
    powers2[i] = powers2[i - 1] * 10LL;
    powers2[i] = powers2[i] % k;
  }
}
long long f(long long idx, long long tot, long long start) {
  if (idx == n) {
    if (tot == 0 && start)
      return 1LL;
    else
      return 0LL;
  }
  if (tot == 0 && start) {
    long long res = 9;
    res = mul(res, powers[n - idx - 1]);
    return res;
  }
  if (dp[idx][tot][start] != -1) return dp[idx][tot][start];
  long long sum = 0LL;
  for (long long i = 0; i < 10; i++) {
    long long start2 = start | (i != 0);
    long long num = (i * powers2[idx]) % k + tot;
    sum += f(1 + idx, num % k, start2);
    sum = sum % mod;
  }
  sum = sum % mod;
  return dp[idx][tot][start] = sum;
}
int main() {
  memset(dp, -1, sizeof dp);
  cin >> n >> k >> mod;
  gen();
  cout << f(0, 0, 0) % mod;
}
