#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e3 + 5;
const int MAXN2 = 100 + 5;
long long m;
long long dp[MAXN][MAXN2];
long long dp2[MAXN];
long long binpow(long long a, long long st) {
  long long ans = 1;
  for (; st; st >>= 1) {
    if (st & 1) {
      ans = (ans * a + m) % m;
    }
    a = (a * a + m) % m;
  }
  return ans;
}
long long get_num(int l, int r) {
  if (l > r) return 1;
  long long ans = (9 * binpow(10, r - l) + m) % m;
  return ans;
}
void solve() {
  int n, k;
  cin >> n >> k >> m;
  if (n == 1) {
    long long ans = 0;
    for (int i = 1; i <= 9; i++) {
      if (i % k == 0) ans++;
    }
    ans %= m;
    cout << ans;
    return;
  }
  for (int i = 0; i < 10; i++) {
    if (i % k != 0 || !i) {
      dp[1][i % k] = (dp[1][i % k] + 1) % m;
    } else {
      dp2[1] = (dp2[1] + 1) % m;
    }
  }
  long long cur = 10;
  for (int i = 2; i < n; i++) {
    for (int j = 0; j < k; j++) {
      for (int h = 0; h < 10; h++) {
        int r = (j + cur * h) % k;
        if (r || !h) {
          dp[i][r] = (dp[i][r] + dp[i - 1][j]) % m;
        } else {
          dp2[i] = (dp2[i] + dp[i - 1][j]) % m;
        }
      }
    }
    cur = (cur * 10) % k;
  }
  for (int j = 0; j < k; j++) {
    for (int h = 1; h < 10; h++) {
      int r = (j + cur * h) % k;
      if (r) {
        dp[n][r] = (dp[n][r] + dp[n - 1][j]) % m;
      } else {
        dp2[n] = (dp2[n] + dp[n - 1][j]) % m;
      }
    }
  }
  long long ans = 0;
  for (int i = 1; i <= n; i++) {
    cur = get_num(i + 1, n);
    ans = (ans + cur * dp2[i]) % m;
  }
  cout << ans;
}
int main() {
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
