#include <bits/stdc++.h>
using namespace std;
const int NEED_SIZE1 = 1005, NEED_SIZE2 = 105;
int dp[2][NEED_SIZE1][NEED_SIZE2], power_10[NEED_SIZE1];
int main() {
  int n, k, m;
  cin >> n >> k >> m;
  power_10[0] = 1 % k;
  for (int i = 1; i < NEED_SIZE1; i++) {
    power_10[i] = (power_10[i - 1] * 10) % k;
  }
  long long answer = 0;
  for (int i = 1; i <= 9; i++) {
    dp[i % k == 0][1][i % k] += 1 % m;
    dp[i % k == 0][1][i % k] %= m;
  }
  if (n > 1) {
    dp[0][1][0] += 1;
    dp[0][1][0] %= m;
  }
  for (int i = 1; i < n; i++) {
    for (int j = 0; j < k; j++) {
      for (int p = 0; p < 2; p++) {
        for (int new_digit = 0; new_digit <= 9; new_digit++) {
          if (i == n - 1 && new_digit == 0) continue;
          int residue = (j + new_digit * power_10[i]) % k;
          bool new_p = p || (residue == 0 && new_digit != 0);
          dp[new_p][i + 1][residue] += dp[p][i][j];
          dp[new_p][i + 1][residue] %= m;
        }
      }
    }
  }
  for (int i = 0; i < k; i++) {
    answer = (answer + dp[1][n][i]) % m;
  }
  cout << answer << endl;
}
