#include <bits/stdc++.h>
const long long inf = 0x3f3f3f3f3f3f3f3LL;
using namespace std;
template <class T>
void smin(T& a, T val) {
  if (a > val) a = val;
}
template <class T>
void smax(T& a, T val) {
  if (a < val) a = val;
}
const long long N = 1010;
long long n, k;
long long dp[N][105][2];
long long mod;
long long power(long long a, long long b, long long m) {
  if (b < 0) b += m - 1;
  long long r = 1;
  while (b) {
    if (b & 1) r = (r * a) % m;
    a = (a * a) % m;
    b >>= 1;
  }
  return r;
}
long long solve(long long len, long long MOD, bool all_zero) {
  if (len == n) {
    return MOD == 0 and all_zero;
  }
  if (MOD == 0 and all_zero) {
    return 9 * power(10, n - len - 1, mod) % mod;
  }
  long long& ans = dp[len][MOD][all_zero];
  if (~ans) {
    return ans;
  }
  ans = 0;
  for (long long i = 0; i < 10; ++i) {
    long long till = power(10, len, k);
    bool nzero = all_zero | ((i != 0));
    ans += solve(len + 1, ((i * till) % k + MOD) % k, nzero) % mod;
    ans %= mod;
  }
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> k >> mod;
  memset(dp, -1, sizeof dp);
  cout << solve(0, 0, 0);
  return 0;
}
