#include <bits/stdc++.h>
using namespace std;
int m;
int n, k;
const int size = 1005;
long long int dp[size][105];
long long int fast_exp(long long int x, long long int p, long long int mod) {
  long long int res = 1;
  x %= mod;
  while (p) {
    if (p & 1) res = (res * x) % mod;
    x = (x * x) % mod;
    p >>= 1;
  }
  return res;
}
long long int solve(int i, int j, bool flag) {
  if (i > n) return 0;
  if (i == n && (j != 0 || !flag)) return 0;
  if (i == n && j == 0 && flag) return 1;
  if (j == 0 && flag) return (9LL * fast_exp(10, n - i - 1, m)) % m;
  long long int &res = dp[i][j];
  if (res != -1) return res;
  res = 0;
  for (int it = 0; it <= 9; it++) {
    res = (res +
           solve(i + 1, (fast_exp(10, i, k) * it + j) % k, flag | (it != 0))) %
          m;
  }
  return res;
}
int main() {
  cin >> n >> k >> m;
  memset(dp, -1, sizeof dp);
  dp[n][0] = 1;
  cout << solve(0, 0, 0) << "\n";
}
