#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool read(T &x) {
  int c = getchar();
  int sgn = 1;
  while (~c && c<'0' | c> '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  for (x = 0; ~c && '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  x *= sgn;
  return ~c;
}
struct debugger {
  template <typename T>
  debugger &operator,(const T &v) {
    cerr << v << "    ";
    return *this;
  }
} dbg;
template <class T>
void __stl_print__(T &x) {
  cerr << "[";
  for (__typeof((x).end()) i = (x).begin(); i != (x).end(); ++i)
    cerr << (i != x.begin() ? ", " : "") << *i;
  cerr << "]" << endl;
}
template <class T, class U>
inline T max(T &a, U &b) {
  return a > b ? a : b;
}
template <class T, class U>
inline T min(T &a, U &b) {
  return a < b ? a : b;
}
template <class T, class U>
inline T swap(T &a, U &b) {
  T tmp = a;
  a = b;
  b = tmp;
}
const long long INF = (1ll) << 50;
const int mx = 1e5 + 7;
const int mod = 1000000007;
const double pi = 2 * acos(0.0);
int EQ(double d) {
  if (fabs(d) < 1e-7) return 0;
  return d > 1e-7 ? 1 : -1;
}
long long dp[1002][102][2][2][10], powOfTen[1002];
int n, k, m;
long long call(int pos, int rem, bool f1, bool f2, int lst) {
  if (pos == n) return (f2 && lst);
  long long &ret = dp[pos][rem][f1][f2][lst];
  if (ret != -1) return ret;
  ret = 0;
  for (__typeof((10) - 1) i = (0); i <= ((10) - 1); ++i) {
    long long trem = i * powOfTen[pos] + rem;
    trem %= k;
    bool tf1 = (f1 || (i != 0));
    bool tf2 = tf1 && (f2 || (trem == 0));
    ret += call(pos + 1, trem, tf1, tf2, i);
    ret %= m;
  }
  return ret;
}
int main() {
  n = ({
    int a;
    read(a);
    a;
  }),
  k = ({
    int a;
    read(a);
    a;
  }),
  m = ({
    int a;
    read(a);
    a;
  });
  powOfTen[0] = 1;
  for (__typeof(n) i = (1); i <= (n); ++i)
    powOfTen[i] = (powOfTen[i - 1] * 10) % k;
  memset(dp, -1, sizeof(dp));
  cout << call(0, 0, 0, 0, 0) << endl;
}
