#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9 + 7;
using ll = int_fast64_t;
int main() {
  ll n, k, m;
  cin >> n >> k >> m;
  ll dp[1001][100][2];
  memset(dp, 0, sizeof(dp));
  vector<ll> d10(n + 1);
  d10[0] = 1 % k;
  for (int i = 1; i <= n; ++i) {
    d10[i] = d10[i - 1] * 10 % k;
  }
  dp[0][0][0] = 1;
  for (int len = 1; len <= n; ++len) {
    for (int r = 0; r < k; ++r) {
      for (int digit = 0; digit < 10; ++digit) {
        int new_r = (r + d10[len - 1] * digit) % k;
        if (new_r == 0) {
          dp[len][new_r][1] += dp[len - 1][r][1] + dp[len - 1][r][0];
          if (digit == 0) {
            dp[len][new_r][1]--;
            dp[len][new_r][0]++;
          }
          dp[len][new_r][1] %= m;
          dp[len][new_r][0] %= m;
        } else {
          dp[len][new_r][1] += dp[len - 1][r][1];
          dp[len][new_r][0] += dp[len - 1][r][0];
          dp[len][new_r][1] %= m;
          dp[len][new_r][0] %= m;
        }
      }
    }
  }
  ll ans = 0;
  for (int i = 0; i < k; ++i) {
    ans += dp[n][i][1] - dp[n - 1][i][1];
    ans %= m;
  }
  if (ans < 0) {
    ans += m;
  }
  cout << ans << endl;
  return 0;
}
