#include <bits/stdc++.h>
using namespace std;
int n, k, m;
int base[1010];
int dp[1010][110][2];
void readin() { cin >> n >> k >> m; }
int calc(int i, int j, int ok) {
  if (i > n) return j == 0 ? 1 : 0;
  if (dp[i][j][ok] != -1) return dp[i][j][ok];
  int temp = 0;
  if (ok) {
    for (int t = int(i == n ? 1 : 0); t <= int(9); t++)
      temp = (temp + calc(i + 1, 0, ok)) % m;
  } else {
    for (int t = int(i == n ? 1 : 0); t <= int(9); t++) {
      int jj = (t * base[i] + j) % k;
      temp = (temp + calc(i + 1, jj, jj == 0 && t != 0)) % m;
    }
  }
  dp[i][j][ok] = temp;
  return temp;
}
void process() {
  base[1] = 1;
  for (int i = int(2); i <= int(n); i++) base[i] = (base[i - 1] * 10) % k;
  for (int i = 0; i < (n + 1); i++)
    for (int j = 0; j < (k + 1); j++)
      for (int t = 0; t < (2); t++) dp[i][j][t] = -1;
  int res = calc(1, 0, false);
  cout << res << endl;
}
int main() {
  readin();
  process();
  return 0;
}
