#include <bits/stdc++.h>
using namespace std;
long long int pt[2000];
long long int n, m, k;
long long int dp[2][2][1005][105];
long long int dfs(int reach, int st, int cloc, int rem) {
  if (cloc == -1) return reach;
  long long int &ret = dp[reach][st][cloc][rem];
  if (ret == -1) {
    ret = 0;
    for (int i = (cloc == 0); i <= 9; i++) {
      int nrem = (rem + pt[n - 1 - cloc] * i) % k;
      int nst = (st || (i != 0));
      int nreach = (reach || (nst & (nrem == 0)));
      ret += dfs(nreach, nst, cloc - 1, nrem);
      ret %= m;
    }
  }
  return ret;
}
int main() {
  int i;
  memset(dp, -1, sizeof(dp));
  cin >> n >> k >> m;
  pt[0] = 1 % k;
  for (i = 1; i <= n; i++) {
    pt[i] = (pt[i - 1] * 10) % k;
  }
  cout << dfs(0, 0, n - 1, 0) << endl;
  return 0;
}
