#include <bits/stdc++.h>
using namespace std;
int xm[4] = {-1, 1, 0, 0};
int ym[4] = {0, 0, -1, 1};
const int MOD = 1e9 + 7;
const int MAXN = 5e5 + 5;
const long long POW = 9973;
long long dp[1005][105][2];
long long p[1005];
long long e[1005];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  p[0] = 1;
  e[0] = 1;
  int n, k, m;
  cin >> n >> k >> m;
  for (int i = 1; i <= 1000; i++) p[i] = (p[i - 1] * 10) % k;
  for (int i = 1; i <= 1000; i++) e[i] = (e[i - 1] * 10) % m;
  long long ans = 0;
  dp[0][0][0] = 1 % m;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < k; j++) {
      for (int l = 0; l < 10; l++) {
        dp[i + 1][(l * p[i] + j) % k][1] += dp[i][j][1];
        if (l) {
          dp[i + 1][(l * p[i] + j) % k][1] += dp[i][j][0];
          dp[i + 1][(l * p[i] + j) % k][1] %= m;
        } else {
          dp[i + 1][(l * p[i] + j) % k][0] += dp[i][j][0];
          dp[i + 1][(l * p[i] + j) % k][0] %= m;
        }
      }
    }
    ans += dp[i + 1][0][1] * ((i + 1 == n) ? 1 : (9 * e[n - i - 2])) % m;
    ans %= m;
    dp[i + 1][0][1] = 0;
  }
  cout << ans;
}
