#include <bits/stdc++.h>
using namespace std;
const int N = 1001;
const int K = 101;
int n, k, m, dp[N][K], ans;
int binpow(int a, int x, int mod) {
  if (x <= 0) return 1;
  if (x % 2 == 1)
    return ((a * 1LL * binpow(a, x - 1, mod)) % mod);
  else {
    int b = binpow(a, x / 2, mod);
    return ((b * 1LL * b) % mod);
  }
}
int main() {
  cin >> n >> k >> m;
  for (int j = 0; j < 10; j++) dp[1][j % k]++;
  ans = ((((dp[1][0] - 1) * 1LL * binpow(10, n - (1) - 1, m)) % m) *
         (n - (1) > 0 ? 9 : 1)) %
        m;
  dp[1][0] = 1;
  for (int i = 1; i < n; i++) {
    for (int mod = 0; mod < k; mod++) {
      for (int dig = (i == n - 1 ? 1 : 0); dig < 10; dig++) {
        int new_mod = (mod + binpow(10, i, k) * dig) % k;
        if (new_mod != 0 || mod == 0 && dig == 0) {
          dp[i + 1][new_mod] = (dp[i + 1][new_mod] + dp[i][mod]) % m;
        } else {
          ans = (ans +
                 (((dp[i][mod] * 1LL * binpow(10, n - (i + 1) - 1, m)) % m) *
                  (n - (i + 1) > 0 ? 9 : 1)) %
                     m) %
                m;
        }
      }
    }
  }
  cout << ans;
  return 0;
}
