#include <bits/stdc++.h>
using namespace std;
long long expo[1010];
long long dp[1010][110][2][2][2];
int main(int argc, char **argv) {
  long long N, K, M;
  cin >> N >> K >> M;
  expo[0] = 1;
  for (int i = (1); i < (N); ++i) expo[i] = (expo[i - 1] * 10) % K;
  dp[0][0][0][1][0] = 1;
  for (int i = (1); i < (N + 1); ++i) {
    for (int k = (0); k < (K); ++k) {
      for (int l = (0); l < (2); ++l) {
        for (int z = (0); z < (2); ++z) {
          for (int q = (0); q < (2); ++q) {
            for (int d = (0); d < (10); ++d) {
              int next_k = (k + d * expo[i - 1]) % K;
              bool next_l = (d == 0);
              bool next_z = (z == 1) && (d == 0);
              bool next_q = q | (next_k == 0 && !next_z);
              dp[i][next_k][next_l][next_z][next_q] =
                  ((dp[i][next_k][next_l][next_z][next_q]) +
                   (dp[i - 1][k][l][z][q])) %
                  (M);
            }
          }
        }
      }
    }
  }
  long long res = 0;
  for (int k = (0); k < (K); ++k) res = ((res) + (dp[N][k][0][0][1])) % (M);
  cout << res;
  return 0;
}
