#include <bits/stdc++.h>
using namespace std;
int n, k, MOD;
long long modPow(long long n, long long p, long long MOD) {
  if (p == 0) return 1;
  long long x = modPow(n, p / 2, MOD);
  if (p & 1LL) return (x % MOD * x % MOD * n % MOD) % MOD;
  return (x % MOD * x % MOD) % MOD;
}
long long dp[1001][101][2][2];
long long solve(int idx, int rem, bool f, bool z) {
  if (idx == n) return !z && !f && rem == 0;
  if (dp[idx][rem][f][z] != -1) return dp[idx][rem][f][z];
  long long sum = 0;
  if (!f && !z && rem == 0)
    return (modPow(10, n - idx - 1, MOD) * 9LL % MOD) % MOD;
  for (int i = 0; i <= 9; i++) {
    sum += solve(idx + 1, (rem % k + (i % k * modPow(10, idx, k)) % k) % k, 0,
                 i == 0);
    sum %= MOD;
  }
  return dp[idx][rem][f][z] = sum;
}
int main() {
  ios_base::sync_with_stdio(0);
  while (cin >> n >> k >> MOD) {
    memset(dp, -1, sizeof(dp));
    cout << solve(0, 0, 1, 0) << endl;
    ;
  }
  return 0;
}
