Amr doesn't like Maths as he finds it really boring, so he usually sleeps in Maths lectures. But one day the teacher suspected that Amr is sleeping and asked him a question to make sure he wasn't.

First he gave Amr two positive integers n and k. Then he asked Amr, how many integer numbers x > 0 exist such that:

  * Decimal representation of x (without leading zeroes) consists of exactly n digits; 
  * There exists some integer y > 0 such that: 
    * <image>; 
    * decimal representation of y is a suffix of decimal representation of x. 



As the answer to this question may be pretty huge the teacher asked Amr to output only its remainder modulo a number m.

Can you help Amr escape this embarrassing situation?

Input

Input consists of three integers n, k, m (1 ≤ n ≤ 1000, 1 ≤ k ≤ 100, 1 ≤ m ≤ 109).

Output

Print the required number modulo m.

Examples

Input

1 2 1000


Output

4

Input

2 2 1000


Output

45

Input

5 3 1103


Output

590

Note

A suffix of a string S is a non-empty string that can be obtained by removing some number (possibly, zero) of first characters from S.
import java.awt.*;
import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicInteger;

import static java.lang.Math.*;

public class solver implements Runnable {
    final boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
    BufferedReader in;
    PrintWriter out;
    StringTokenizer tok = new StringTokenizer("");
    String delim = " ";

    String readString() throws IOException {
        try {
            while (!tok.hasMoreTokens()) {
                tok = new StringTokenizer(in.readLine());
            }
            return tok.nextToken(delim);
        } catch (Exception e) {
            return null;
        }
    }

    int readInt() throws IOException {
        return Integer.parseInt(readString());
    }

    long readLong() throws IOException {
        return Long.parseLong(readString());
    }

    double readDouble() throws IOException {
        return Double.parseDouble(readString());
    }

    Point readPoint() throws IOException {
        return new Point(readInt(), readInt());
    }

    // ----------------------------------   
    
    int gcd(int a, int b) {
        if (a == 0) return b;
        return gcd(b % a, a);
    }   
    
    // ----------------------------------------
    void solve() throws NumberFormatException, IOException {
        int n = readInt();
        int k = readInt();
        int mod = readInt();
        if (n == 1) {
            int ans = 0;
            for (int i=1;i<10;i++) if (i % k == 0) ans++;
            ans %= mod;
            out.println(ans);
            return;
        }
        long[] pow10 = new long[n];
        pow10[0] = 1;
        pow10[1] = 9;
        for (int i=2;i<n;i++) pow10[i] = pow10[i-1] * 10 % mod;
        
        int[][] dp = new int[k][n];
        for (int i=1;i<10;i++) dp[i % k][n-1] ++;
        
        long ans = pow10[n-1] * dp[0][n-1] % mod;
        dp[0][n-1] = 1;
        int x = 1;
        for (int i=n-2;i>=0;i--) {
            x = x * 10 % k;
            for (int j=0;j<10;j++) {
                for (int prev = j == 0 ? 1 : 0; prev < k; prev ++) {
                    int cur = j * x + prev;
                    cur %= k;
                    
                    dp[cur][i] = (dp[cur][i] + dp[prev][i+1]) % mod;                    
                }
            }
            ans  = ans + pow10[i] * dp[0][i];
            ans %= mod;
            dp[0][i] = 1;
        }
        
        out.println(ans);
    }

    // ----------------------------------------

    public static void main(String[] args) {
        new Thread(null, new solver(), "", 256 * (1L << 20)).start();
    }

    public void run() {
        try {
            timeBegin = System.currentTimeMillis();

            try {
                if (ONLINE_JUDGE) {
                    in = new BufferedReader(new InputStreamReader(System.in));
                    out = new PrintWriter(System.out);
                } else {
                    in = new BufferedReader(new FileReader("input.txt"));
                    out = new PrintWriter("output.txt");
                }
            } catch (Throwable e) {
                in = new BufferedReader(new InputStreamReader(System.in));
                out = new PrintWriter(System.out);
            }

            solve();
            out.close();

            timeEnd = System.currentTimeMillis();
            if (!ONLINE_JUDGE) System.err.println("Time = " + (timeEnd - timeBegin));
        } catch (Exception e) {
            e.printStackTrace(System.err);
            System.exit(-1);
        }
    }

    long timeBegin, timeEnd;
}