#include <bits/stdc++.h>
using namespace std;
int n, k, P;
int s[1020];
int f[1020][120][2];
inline void dfs(int x) {
  for (int i = 0; i < k; i++) {
    for (int j = (x == n - 1); j <= 9; j++) {
      int az = (j * s[x] + i) % k;
      if (j && az == 0) {
        f[x + 1][az][1] = (f[x + 1][az][1] + f[x][i][0]) % P;
      } else {
        f[x + 1][az][0] = (f[x + 1][az][0] + f[x][i][0]) % P;
      }
      f[x + 1][az][1] = (f[x + 1][az][1] + f[x][i][1]) % P;
    }
  }
  if (x < n - 1) dfs(x + 1);
}
int main() {
  scanf("%d%d%d", &n, &k, &P);
  s[0] = 1;
  for (int i = 1; i <= n; i++) s[i] = (s[i - 1] * 10) % k;
  f[0][0][0] = 1;
  dfs(0);
  int ans = 0;
  for (int i = 0; i < k; i++) (ans += f[n][i][1]) %= P;
  printf("%d", ans);
}
