#include <bits/stdc++.h>
using LL = long long;
const int N = 1000 + 5;
const int M = 100 + 5;
int n, K, m;
int dp[N][M][2];
int ten[N];
inline void add(int &a, int b) {
  a += b;
  if (a >= m) a -= m;
}
int work() {
  ten[0] = 1;
  for (int i = 1; i < N; ++i) {
    ten[i] = (LL)ten[i - 1] * 10 % m;
  }
  dp[n][0][0] = 1;
  for (int i = n, base = 1 % K; i > 0; --i) {
    for (int j = 0; j < K; ++j) {
      for (int k = 0; k < 2; ++k) {
        if (dp[i][j][k] == 0) continue;
        if (j == 0 && k == 1) continue;
        for (int r = 0; r < 10; ++r) {
          add(dp[i - 1][(j + r * base) % K][r != 0], dp[i][j][k]);
        }
      }
    }
    base = base * 10 % K;
  }
  int ret = 0;
  for (int i = 0; i < n; ++i) {
    int delta = 1 % m;
    if (i != 0) {
      delta = 9ll * ten[i - 1] % m;
    }
    add(ret, (LL)delta * dp[i][0][1] % m);
  }
  return ret;
}
int main() {
  scanf("%d%d%d", &n, &K, &m);
  printf("%d\n", work());
  return 0;
}
