#include <bits/stdc++.h>
using namespace std;
long long dp[1010][110][2], dp2[1010][110][2], ans, nonZero[1010], pw[1010];
long long n, k, m;
long long expMod(long long base, long long ex, long long mod) {
  if (ex == 0) return 1;
  long long temp = expMod(base, ex / 2, mod);
  temp = (temp * temp) % mod;
  if (ex % 2) temp = (temp * base) % mod;
  return temp;
}
long long f(long long pos, long long rem, bool started) {
  if (pos == n) {
    if (rem == 0) {
      return 1;
    } else {
      return 0;
    }
  }
  long long& ret = dp[pos][rem][started];
  if (~ret) {
    return ret;
  }
  if (not started) {
    ret = 0;
    for (long long i = 1; i < 10; i++) {
      ret += f(pos + 1, (rem * 10 + i) % k, 1);
      if (ret >= m) {
        ret -= m;
      }
    }
  } else {
    ret = 0;
    for (long long i = 0; i < 10; i++) {
      ret += f(pos + 1, (rem * 10 + i) % k, 1);
      if (ret >= m) {
        ret -= m;
      }
    }
  }
  return ret;
}
long long g(long long pos, long long rem, long long started) {
  if (pos == -1) {
    return (rem == 0) ? 0 : 1;
  }
  long long& ret = dp2[pos][rem][started];
  if (~ret) {
    return ret;
  }
  ret = 0;
  if (pos == 0) {
    for (long long i = 1; i < 10; i++) {
      long long remAdd =
          (expMod(10, n - pos - 1, k) * ((long long)i)) % ((long long)k);
      if ((rem + remAdd) % k != 0) {
        ret += g(pos - 1, (rem + remAdd) % k, 1);
      }
      if (ret >= m) {
        ret -= m;
      }
    }
  } else {
    if (started) {
      for (long long i = 0; i < 10; i++) {
        long long remAdd =
            (expMod(10, n - pos - 1, k) * ((long long)i)) % ((long long)k);
        if ((rem + remAdd) % k != 0) {
          ret += g(pos - 1, (rem + remAdd) % k, 1);
        }
        if (ret >= m) {
          ret -= m;
        }
      }
    } else {
      for (long long i = 1; i < 10; i++) {
        long long remAdd = (pw[n - pos - 1] * ((long long)i)) % ((long long)k);
        if ((rem + remAdd) % k != 0) {
          ret += g(pos - 1, (rem + remAdd) % k, 1);
        }
        if (ret >= m) {
          ret -= m;
        }
      }
      ret += g(pos - 1, rem, 0);
      if (ret >= m) {
        ret -= m;
      }
    }
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> k >> m;
  memset(dp, -1, sizeof dp);
  memset(dp2, -1, sizeof dp2);
  for (long long i = 0; i < n + 10; i++) {
    pw[i] = expMod(10, i, k);
  }
  for (long long i = 1; i < n; i++) {
    long long tans = (f(i, 0, 0) * g(i - 1, 0, 0));
    tans %= m;
    ans += tans;
    if (ans >= m) {
      ans -= m;
    }
  }
  ans += f(0, 0, 0);
  cout << ans % m << "\n";
}
