#include <bits/stdc++.h>
using namespace std;
long long n, k, mod;
long long dp[1005][105][2];
long long powers[1005];
long long powers2[1005];
long long go(long long i, long long j, bool yes) {
  if (j == 0 && yes) {
    if (i == n) return 1;
    return (powers[n - i - 1] * 1LL * 9) % mod;
  }
  if (i == n || (j == 0 && yes)) return 0;
  if (dp[i][j][yes] != -1) return dp[i][j][yes];
  long long result = 0;
  for (long long l = 0; l < 10; l++) {
    result = (result + go(i + 1, (j + (l * 1LL * powers2[i]) % k) % k,
                          (yes || l != 0))) %
             mod;
  }
  dp[i][j][yes] = result;
  return result;
}
void process() {
  powers[0] = powers2[0] = 1;
  for (int i = 1; i <= 1000; i++) {
    powers[i] = (powers[i - 1] * 10) % mod;
    powers2[i] = (powers2[i - 1] * 10) % k;
  }
  for (int i = 0; i <= 1000; i++)
    for (int j = 0; j <= 100; j++) dp[i][j][0] = dp[i][j][1] = -1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> k >> mod;
  process();
  cout << go(0, 0, 0) << endl;
}
