#include <bits/stdc++.h>
using namespace std;
const long long inf = 2e18 + 7;
const long long mod = 1e9 + 7;
const double eps = 1e-9;
const double PI = 2 * acos(0.0);
const double E = 2.71828;
int n, k, m;
int f[1005][105][2][2][2];
int pw[1005];
int main(void) {
  scanf("%d %d %d", &n, &k, &m);
  pw[0] = 1;
  for (int i = 1; i <= n; ++i) {
    pw[i] = (pw[i - 1] * 10LL) % k;
  }
  f[0][0][0][0][0] = 1;
  for (int i = 0; i < n; ++i) {
    int mul = pw[i];
    for (int j = 0; j < k; ++j) {
      for (int is = 0; is < 2; ++is) {
        for (int wasD = 0; wasD < 2; ++wasD) {
          for (int bz = 0; bz < 2; ++bz) {
            if (!f[i][j][is][wasD][bz]) {
              continue;
            }
            for (int dig = 0; dig < 10; ++dig) {
              int nj = (j + 1LL * mul * dig) % k;
              int nwasD = wasD | (dig > 0);
              int nbz = (dig > 0);
              int nis = is | (nwasD && !nj);
              f[i + 1][nj][nis][nwasD][nbz] =
                  (f[i + 1][nj][nis][nwasD][nbz] + f[i][j][is][wasD][bz]) % m;
            }
          }
        }
      }
    }
  }
  int res = 0;
  for (int i = 0; i < k; ++i) {
    res = (res + f[n][i][1][1][1]) % m;
  }
  printf("%d\n", res);
  return 0;
}
