#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int M = 3e6 + 10;
const int NN = 1e6;
inline long long read() {
  char ch = getchar();
  long long f = 1, x = 0;
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, m, k;
int fac[1001];
int dp[1005][105][2];
int dfs(int pos, int sum, bool can) {
  if (pos == n) return can;
  if (~dp[pos][sum][can]) return dp[pos][sum][can];
  int bg = pos == n - 1 ? 1 : 0;
  int ans = 0;
  for (int i = bg; i <= 9; i++) {
    (ans += dfs(pos + 1, (sum + 1ll * i * fac[pos]) % k,
                can || ((sum + 1ll * i * fac[pos]) % k == 0 && (sum || i)))) %=
        m;
  }
  dp[pos][sum][can] = ans;
  return ans;
}
int main() {
  n = read(), k = read(), m = read();
  memset(dp, -1, sizeof dp);
  fac[0] = 1;
  for (int i = 1; i <= n; i++) fac[i] = (long long)fac[i - 1] * 10 % k;
  printf("%d\n", dfs(0, 0, 0));
  return 0;
}
