#include <bits/stdc++.h>
using namespace std;
long long dp[1010][110][2];
long long f[1010];
int main() {
  int n, k, m;
  while (~scanf("%d%d%d", &n, &k, &m)) {
    memset(dp, 0, sizeof(dp));
    f[0] = 1;
    for (int i = 1; i <= n; ++i) {
      f[i] = (f[i - 1] * 10) % k;
    }
    dp[0][0][0] = 1;
    for (int i = 1; i <= n; ++i) {
      for (int j = 0; j < k; ++j) {
        for (int x = 0; x < 10; ++x) {
          if (i == n && x == 0) {
            continue;
          }
          int t = (f[i - 1] * x % k + j) % k;
          for (int sta = 0; sta < 2; ++sta) {
            int s = sta;
            if (t == 0 && (x != 0)) {
              s = 1;
            }
            dp[i][t][s] += dp[i - 1][j][sta];
            dp[i][t][s] %= m;
          }
        }
      }
    }
    int ans = 0;
    for (int i = 0; i < k; ++i) {
      ans += dp[n][i][1];
      ans %= m;
    }
    printf("%d\n", ans);
  }
  return 0;
}
