#include <bits/stdc++.h>
using namespace std;
int dp[1005][105][2];
int n, mod, k;
int power1[1005];
int power2[1005];
int func(int ind, int rem, bool flag) {
  if (rem == 0 && flag) {
    return (ind != n ? (9 * 1LL * power1[n - ind - 1]) % mod : 1);
  }
  if (ind == n || (rem == 0 && flag)) {
    return 0;
  }
  int &ans = dp[ind][rem][flag];
  if (ans != -1) return ans;
  ans = 0;
  for (int i = 0; i < 10; i++) {
    ans +=
        func(ind + 1, (rem + (i * 1LL * power2[ind]) % k) % k, flag || i != 0);
    ans %= mod;
  }
  return ans;
}
int main() {
  cin >> n >> k >> mod;
  memset(dp, -1, sizeof(dp));
  long long int j;
  int i;
  j = 1;
  for (i = 0; i <= n; i++) {
    power1[i] = j;
    j *= 10;
    j %= mod;
  }
  j = 1;
  for (i = 0; i <= n; i++) {
    power2[i] = j;
    j *= 10;
    j %= k;
  }
  cout << func(0, 0, 0) << endl;
  return 0;
}
