#include <bits/stdc++.h>
using namespace std;
long long n, m, k, dp[1111][111][2], power[1111];
long long solve(int indx, int mod, bool state) {
  if (indx == n) return (state && !mod);
  long long &res = dp[indx][mod][state];
  if (res != -1) return res % m;
  if (mod == 0 && state) {
    res = 1;
    for (int i = 0; i < n - indx - 1; ++i) res *= (10 % m), res %= m;
    return res = (res % m * 9 % m) % m;
  }
  res = 0;
  for (int i = 0; i < 10; ++i) {
    res += solve(indx + 1, (mod % k + i % k * power[indx] % k) % k,
                 state || (i > 0));
    res %= m;
  }
  return res %= m;
}
int main(int argc, char **argv) {
  memset(dp, -1, sizeof dp);
  cin >> n >> k >> m;
  power[1] = 10;
  for (int i = 2; i <= n; ++i) power[i] = (power[i - 1] % k * 10 % k) % k;
  long long res = 0;
  for (int i = 0; i < 10; ++i) {
    res += solve(1, i % k, (i > 0));
    res %= m;
  }
  cout << res << endl;
  return 0;
}
