#include <bits/stdc++.h>
using namespace std;
int n, k, m;
int st[100500];
int dp[1111][111][11];
int main() {
  scanf("%d%d%d", &n, &k, &m);
  st[0] = 1;
  for (int i = 1; i <= n; i++) {
    st[i] = st[i - 1] * 10;
    st[i] %= k;
  }
  dp[n + 1][0][0] = 1;
  for (int i = n + 1; i > 1; --i)
    for (int ost = 0; ost < k; ost++)
      for (int newC = 0; newC < 10; newC++) {
        if (newC == 0 && i == 2) continue;
        int newOst = st[n - i + 1] * newC + ost;
        newOst %= k;
        (dp[i - 1][newOst][1] += dp[i][ost][1]) %= m;
        if (newOst == 0 && newC != 0)
          (dp[i - 1][newOst][1] += dp[i][ost][0]) %= m;
        else
          (dp[i - 1][newOst][0] += dp[i][ost][0]) %= m;
      }
  int ans = 0;
  for (int i = 0; i < k; i++) (ans += dp[1][i][1]) %= m;
  printf("%d\n", ans);
  return 0;
}
