#include <bits/stdc++.h>
int dp[1000][100][2], N, K, MOD;
long long powm[1003], powk[1003];
int solve(int n, int d, bool b) {
  if (d == 0 && b) return n != N ? (9 * powm[N - n - 1]) % MOD : 1;
  if (n == N) return 0;
  int &temp = dp[n][d][b];
  if (temp != -1) return temp;
  temp = 0;
  for (int i = 0; i < 10; ++i) {
    temp += solve(n + 1, (d + (i * powk[n]) % K) % K, b || i != 0);
    temp %= MOD;
  }
  return temp;
}
int main() {
  scanf("%d %d %d", &N, &K, &MOD);
  memset(dp, -1, sizeof dp);
  powm[0] = 1;
  powk[0] = 1;
  for (int i = 1; i <= N; ++i) {
    powm[i] = (powm[i - 1] * 10) % MOD;
    powk[i] = (powk[i - 1] * 10) % K;
  }
  printf("%d", solve(0, 0, 0));
  return 0;
}
