#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000 + 10, MAXK = 100 + 10;
long long int pmodm[MAXN], pmodk[MAXN];
int n, k, m, dp[MAXN][MAXK][2];
int solve(int slength, int sremainder, bool zero) {
  if (sremainder == 0 && !zero)
    return (slength == n ? 1 : (9 * pmodm[n - slength - 1]) % m);
  if (slength == n) return 0;
  int &res = dp[slength][sremainder][zero];
  if (res != -1) return res;
  res = 0;
  for (int d = 0; d < (int)(10); d++)
    res = (res +
           solve(slength + 1, (d * pmodk[slength] + sremainder) % k, d == 0)) %
          m;
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k >> m;
  fill(dp[0][0], dp[MAXN][0], -1);
  long long int modm = 1, modk = 1;
  for (int i = 0; i < (int)(n); i++) {
    pmodm[i] = modm;
    pmodk[i] = modk;
    modm = (modm * 10) % m;
    modk = (modk * 10) % k;
  }
  cout << solve(0, 0, true) << endl;
  return 0;
}
