#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 5, K = 105;
int n, k, m;
int dp[N][K][2], pw9[1005], pwk[1005];
int ans;
int solve(int suff, int r, int ok) {
  if (r == 0 && ok)
    return (suff != n ? ((9 * 1LL * pw9[n - suff - 1]) % m) : 1);
  if (suff == n || (!r && ok)) return 0;
  int &temp = dp[suff][r][ok];
  if (temp != -1) return temp;
  temp = 0;
  for (int x = 0; x < 10; ++x) {
    temp += solve(suff + 1, (r + (x * pwk[suff]) % k) % k, (ok || x));
    temp %= m;
  }
  return temp;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k >> m;
  memset(dp, -1, sizeof(dp));
  long long l = 1;
  for (int i = 0; i <= n; ++i) {
    pw9[i] = l;
    l *= 10;
    l %= m;
  }
  l = 1;
  for (int i = 0; i <= n; ++i) {
    pwk[i] = l;
    l *= 10;
    l %= k;
  }
  cout << solve(0, 0, 0);
}
