#include <bits/stdc++.h>
using namespace std;
template <typename Iter>
ostream& _out(ostream& s, Iter a, Iter b) {
  for (auto it = a; it != b; it++) s << (it == a ? "" : " ") << *it;
  return s;
}
template <typename A, typename B>
ostream& operator<<(ostream& s, pair<A, B>& p) {
  return s << "(" << p.first << " , " << p.second << ")";
}
template <typename T>
ostream& operator<<(ostream& s, vector<T>& v) {
  return _out(s, v.begin(), v.end());
}
inline long long rit() {
  int key = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') key = -1;
    c = getchar();
  }
  long long x = 0;
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  return x * key;
}
int __ = 1;
void init() {}
void read() {}
void solve() {}
long long dp[1010][110][2];
int main() {
  int n, k;
  long long mod;
  cin >> n >> k >> mod;
  dp[0][0][0] = 1 % mod;
  long long ten = 1 % mod;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < k; j++) {
      for (int type = 0; type < 2; type++)
        if (dp[i][j][type]) {
          for (int num = i == n - 1 ? 1 : 0; num < 10; num++) {
            long long val = ten * num;
            long long ret = (val + j) % k;
            if (type == 0) {
              if (ret == 0 && num != 0) {
                dp[i + 1][ret][1] += dp[i][j][0];
                dp[i + 1][ret][1] %= mod;
              } else {
                dp[i + 1][ret][0] += dp[i][j][0];
                dp[i + 1][ret][0] %= mod;
              }
            } else {
              dp[i + 1][ret][1] += dp[i][j][1];
              dp[i + 1][ret][1] %= mod;
            }
          }
        }
    }
    ten = ten * 10 % k;
  }
  long long ans = 0;
  for (int i = 0; i < k; i++) {
    ans += dp[n][i][1];
    ans %= mod;
  }
  cout << ans << endl;
  return 0;
}
