#include <bits/stdc++.h>
using namespace std;
long long Set(long long N, long long pos) { return N = N | (1 << pos); }
long long reset(long long N, long long pos) { return N = N & ~(1 << pos); }
bool check(long long N, long long pos) { return (bool)(N & (1ll << pos)); }
void CI(long long &_x) { scanf("%lld", &_x); }
void CO(long long &_x) { cout << _x; }
template <typename T>
void getarray(T a[], long long n) {
  for (long long i = 0; i < n; i++) cin >> a[i];
}
template <typename T>
void prLLIarray(T a[], long long n) {
  for (long long i = 0; i < n - 1; i++) cout << a[i] << " ";
  cout << a[n - 1] << endl;
}
const double EPS = 1e-9;
const long long INF = 0x7f7f7f7f;
long long dr8[8] = {1, -1, 0, 0, 1, -1, -1, 1};
long long dc8[8] = {0, 0, -1, 1, 1, 1, -1, -1};
long long dr4[4] = {0, 0, 1, -1};
long long dc4[4] = {-1, 1, 0, 0};
long long kn8r[8] = {1, 2, 2, 1, -1, -2, -2, -1};
long long kn8c[8] = {2, 1, -1, -2, -2, -1, 1, 2};
int mod;
int n, k;
long long pow_of_10[1005];
long long dp[1005][105];
long long rec(int inx, int rem, bool zero) {
  if (inx > 0 && rem == 0 && zero) return 0;
  if (inx == n) {
    return 1;
  }
  long long &ans = dp[inx][rem];
  if (ans != -1) return ans;
  ans = 0;
  for (int i = 0; i <= 9; i++) {
    if (inx == n - 1 && i == 0) continue;
    long long new_rem = (rem + ((i * pow_of_10[inx]) % k)) % k;
    ans += rec(inx + 1, new_rem, zero || i);
    ans = ans % mod;
  }
  return ans;
}
int main() {
  memset(dp, -1, sizeof dp);
  cin >> n >> k >> mod;
  pow_of_10[0] = 1;
  for (int i = 1; i < 1005; i++) pow_of_10[i] = (10 * pow_of_10[i - 1]) % k;
  long long ans = 9;
  for (int i = 1; i < n; i++) ans = (ans * 10) % mod;
  cout << (ans - rec(0, 0, 0) + mod) % mod << "\n";
}
