#include <bits/stdc++.h>
using namespace std;
const int N = 1111;
const int INF = 1000000000, mod = 1000000007;
const long long LLINF = 1000000000000000000ll;
long long dp[N][N][2];
long long pw[N];
int n, m, k;
long long solve(int suff, int rem, int was) {
  long long& temp = dp[suff][rem][was];
  if (temp != -1) return temp;
  long long res = 0ll;
  for (int dig = (suff == 1); dig < 10; ++dig) {
    int newRem = (rem - (pw[n - suff] * dig) % k + k) % k;
    if (was) {
      res += solve(suff + 1, newRem, 1);
      if (rem == 0 && dig != 0) res += solve(suff + 1, newRem, 0);
    } else {
      if (!(rem == 0 && dig != 0)) res += solve(suff + 1, newRem, 0);
    }
    res %= m;
  }
  return dp[suff][rem][was] = res;
}
void init() {
  for (int i = 0; i <= n; ++i) {
    for (int j = 0; j < k; ++j) {
      dp[i][j][0] = dp[i][j][1] = -1;
    }
  }
  for (int i = 0; i < k; ++i) {
    dp[n + 1][i][0] = 0;
    dp[n + 1][i][1] = 0;
  }
  dp[n + 1][0][0] = 1;
  pw[0] = 1;
  for (int i = 1; i <= n; ++i) {
    pw[i] = (pw[i - 1] * 10) % k;
  }
}
int main() {
  scanf("%d%d%d", &n, &k, &m);
  init();
  long long res = 0ll;
  for (int i = 0; i < k; ++i) {
    res += solve(1, i, 1);
    if (res >= m) res -= m;
  }
  printf("%I64d\n", res);
  return 0;
}
