#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int maxn = 1e6 + 5;
const int inf = 0x3f3f3f3f;
const long long INF = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-8;
const double PI = acos(-1.0);
long long dp[1005][105];
long long d, res, tot = 9, tmp = 1;
int main() {
  int n, k, m;
  scanf("%d%d%d", &n, &k, &m);
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < k; j++) {
      for (int t = 0 + (i == n); t <= 9; t++) {
        d = (t * tmp + j) % k;
        if (d) dp[i][d] = (dp[i][d] + dp[i - 1][j] + (j == 0)) % m;
      }
    }
    tmp = (tmp * 10) % k;
  }
  for (int i = 1; i < n; i++) tot = tot * 10 % m;
  for (int i = 1; i < k; i++) res = (res + dp[n][i]) % m;
  printf("%lld\n", (m + tot - res) % m);
  return 0;
}
