#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
template <typename T, typename U>
static inline void amin(T& x, U y) {
  if (y < x) x = y;
}
template <typename T, typename U>
static inline void amax(T& x, U y) {
  if (x < y) x = y;
}
long long max(long long a, long long b) { return (a > b) ? a : b; }
long long min(long long a, long long b) { return (a < b) ? a : b; }
long long n, m, k;
long long expo(long long a, long long b) {
  if (b == 0) return 1;
  long long g = expo(a, b / 2);
  if (b & 1) {
    return (((g * g) % k) * a) % k;
  } else
    return (g * g) % k;
}
long long dp[1005][105][2];
long long go(long long idx, long long modulo, long long found,
             long long grzero) {
  if (idx >= n) {
    return found && grzero;
  }
  if (dp[idx][modulo][found] != -1) {
    return dp[idx][modulo][found];
  }
  long long sm = (idx == n - 1 ? 1 : 0);
  long long ans = 0;
  long long pm = modulo, f = found, g = grzero;
  for (long long i = 0; i < 10; i++) {
    modulo = pm;
    found = f;
    grzero = 0;
    modulo += i * expo(10, idx);
    modulo %= k;
    if (i > 0) grzero = 1;
    if (modulo == 0 and grzero) found = 1;
    ans += go(idx + 1, modulo, found, grzero);
    ans %= m;
  }
  return dp[idx][pm][f] = ans;
}
long long solve() {
  cin >> n >> k >> m;
  memset(dp, -1, sizeof(dp));
  cout << go(0, 0, 0, 0);
  return 0;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
