#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
const int K = 111;
int dp[N][K][2], toMul[N];
int n, k, m;
inline void add(int& a, int b) {
  a += b;
  if (a >= m) a -= m;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k >> m;
  for (int i = 0; i < (n); ++i) {
    if (i == 0)
      toMul[i] = 1;
    else if (i == 1)
      toMul[i] = 9;
    else
      toMul[i] = (long long)toMul[i - 1] * 10ll % m;
  }
  memset(dp, 0, sizeof(dp));
  dp[n][0][0] = 1;
  int ans = 0, p10 = 1;
  for (int i = n - 1; i >= 0; --i) {
    for (int d = 0; d < (10); ++d) {
      for (int j = 0; j < (k); ++j) {
        int rem = (d * p10 + j) % k;
        for (int z = 0; z < (2); ++z)
          add(dp[i][rem][z > 0 or d > 0], dp[i + 1][j][z]);
      }
    }
    add(ans, (long long)toMul[i] * dp[i][0][1] % m);
    dp[i][0][1] = 0;
    p10 = p10 * 10 % k;
  }
  cout << ans << '\n';
  return 0;
}
