#include <bits/stdc++.h>
using namespace std;
int dp[1005][105][2], m;
int main() {
  int T, i, j, k, n, ca = 0;
  while (~scanf("%d%d%d", &n, &k, &m)) {
    dp[0][0][0] = 1;
    int ans = 0, q = 1;
    for (i = 0; i < n; i++, q = q * 10 % k)
      for (j = 0; j < k; j++)
        for (int first = 0; first < 2; first++)
          if (dp[i][j][first]) {
            for (int second = i == n - 1 ? 1 : 0; second <= 9; second++) {
              int z = (j + q * second) % k;
              int r = first | (z == 0 && second > 0);
              dp[i + 1][z][r] = (dp[i + 1][z][r] + dp[i][j][first]) % m;
            }
          }
    for (i = 0; i < k; i++) ans = (ans + dp[n][i][1]) % m;
    printf("%d\n", ans);
  }
}
