#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
int dp[1005][105];
int main() {
  int n, k, m;
  cin >> n >> k >> m;
  memset(dp, 0, sizeof(dp));
  dp[0][0] = 1;
  int u = 1;
  int ans = 9;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j < k; j++) {
      int p = 0;
      if (i == n) p = 1;
      for (; p < 10; p++) {
        if ((j + u * p) % k != 0)
          dp[i][(j + u * p) % k] = (dp[i][(j + u * p) % k] + dp[i - 1][j]) % m;
        else {
          if (p == 0 && j == 0) dp[i][0] += dp[i - 1][0];
        }
      }
    }
    if (i != n) ans = ((long long)ans * 10) % m;
    u = (u * 10) % k;
  }
  for (int i = 1; i < k; i++) {
    ans = (ans - dp[n][i]) % m;
  }
  cout << (ans + m) % m << endl;
}
