#include <bits/stdc++.h>
using namespace std;
long long n, k, m;
long long dp[1001][101];
long long dpz[1001][101];
long long power[1004];
long long tenp[1005];
void solve() {
  dpz[1][0] = 1;
  for (int l = 1; l <= 9; l++) {
    dp[1][l % k]++;
  }
  for (int i = 2; i <= n; i++) {
    for (int j = 0; j < k; j++) {
      for (int l = 0; l <= 9; l++) {
        int ind = (l * tenp[i - 1] + j) % k;
        if (l == 0) {
          if (j == 0) {
            dpz[i][ind] += dpz[i - 1][j];
            dpz[i][ind] %= m;
          } else {
            dpz[i][ind] += dpz[i - 1][j];
            dpz[i][ind] %= m;
            dpz[i][ind] += dp[i - 1][j];
            dpz[i][ind] %= m;
          }
        } else {
          if (j == 0) {
            dp[i][ind] += dpz[i - 1][j];
            dp[i][ind] %= m;
          } else {
            dp[i][ind] += dp[i - 1][j];
            dp[i][ind] %= m;
            dp[i][ind] += dpz[i - 1][j];
            dp[i][ind] %= m;
          }
        }
      }
    }
  }
}
long long val[1005];
int main() {
  long long i, j, q, y, x;
  cin >> n >> k >> m;
  power[0] = 1;
  val[0] = 1;
  val[1] = 9 % m;
  tenp[0] = 1;
  for (i = 1; i <= n; i++) {
    power[i] = power[i - 1] * 10;
    power[i] %= k;
    val[i + 1] = val[i] * 10;
    val[i + 1] %= m;
    tenp[i] = tenp[i - 1] * 10;
    tenp[i] %= k;
  }
  solve();
  long long ans = 0;
  for (i = n; i >= 1; i--) {
    ans += (1LL * dp[i][0] * val[n - i]) % m;
    ans %= m;
  }
  cout << ans;
  return 0;
}
