#include <bits/stdc++.h>
using namespace std;
long long dp[1001][101][2];
long long power_m[1001];
long long power_k[1001];
long long n, k, m;
long long solve(int x, int y, bool non_zero) {
  if (y == 0 && non_zero) {
    if (x != n)
      return (9 * 1ll * power_m[n - x - 1]) % m;
    else
      return 1;
  }
  if (x == n || (y == 0 && non_zero)) return 0;
  long long &res = dp[x][y][non_zero];
  if (res != -1) return res;
  res = 0;
  for (int i = 0; i < 10; i++) {
    res +=
        solve(x + 1, (y + (i * 1LL * power_k[x]) % k) % k, non_zero || i != 0);
    res %= m;
  }
  return res;
}
int main() {
  cin >> n >> k >> m;
  memset(dp, -1, sizeof(dp));
  long long y = 1;
  for (int i = 0; i <= n; i++) {
    power_m[i] = y;
    y = y * 10;
    y = y % m;
  }
  y = 1;
  for (int i = 0; i <= n; i++) {
    power_k[i] = y;
    y = y * 10;
    y = y % k;
  }
  cout << solve(0, 0, 0) << endl;
}
