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.io.*;
import java.util.*;

public class D {
	FastScanner in = new FastScanner(System.in);
	PrintWriter out = new PrintWriter(System.out);

	boolean isOk(int x, int y) {
		for (int i = 10; i <= x * 10; i *= 10) {
			if (x % i == y) return true;
		}
		return false;
	}
	
	public void run() {
		int n = in.nextInt(), k = in.nextInt(), m = in.nextInt();
		
		/*
		int[] cnt = new int[7];
		int start = (int)Math.pow(10, n - 1);
		int res = 0;
		for (int i = start; i < start * 10; i++) {
			for (int j = 1; j <= i; j++) {
				if (j % k == 0 && isOk(i, j)) {
//					out.println(i + " " + j);
					cnt[Integer.toString(j).length()]++;
					res++;
					break;
				}
			}
		}
		System.out.println(Arrays.toString(cnt));
		out.println(res + " " + res % m);
		*/
		
		long[] pow = new long[n+1];
		pow[0] = 1 % m;
		for (int i = 0; i < n; i++) {
			pow[i+1] = (pow[i] * 10L) % m;
		}
		long[][] dp = new long[n+1][k];
		
		dp[0][0] = 1;
		
		long ten = 1 % k;
		long res = 0;
		for (int i = 1; i <= n; i++) {
			for (int j = 0; j < k; j++) {
				for (int x = 0; x <= 9; x++) {
					int nk = (int)((j + x * ten) % k);
					
					if (nk == 0 && x != 0) {
						long rate = i == n ? 1 : (pow[n-i] - pow[n-i-1] + m) % m;
//						System.out.println((i-1) + " " + j + " " + dp[i-1][j] + " " + x + " " + rate);
						res = (res + (rate * dp[i-1][j]) % m) % m;
					} else {
//						System.out.println("b : " + i + " " + nk + " <- " + (i-1) + " " + j + " " + x + " " + dp[i-1][j]);
						dp[i][nk] = (dp[i][nk] + dp[i-1][j]) % m;
					}
				}
			}
			ten = (ten * 10) % k;
		}
		System.out.println(res);
		
		out.close();
	}
	
//	[0, 27000, 18900, 13230, 9261, 7203, 0]
//	75594 590

	public static void main(String[] args) {
		new D().run();
	}

	public void mapDebug(int[][] a) {
		System.out.println("--------map display---------");

		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				System.out.printf("%3d ", a[i][j]);
			}
			System.out.println();
		}

		System.out.println("----------------------------");
		System.out.println();
	}

	public void debug(Object... obj) {
		System.out.println(Arrays.deepToString(obj));
	}

	class FastScanner {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public FastScanner(InputStream stream) {
			this.stream = stream;
			//stream = new FileInputStream(new File("dec.in"));

		}

		int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		boolean isEndline(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}

		int nextInt() {
			return Integer.parseInt(next());
		}

		int[] nextIntArray(int n) {
			int[] array = new int[n];
			for (int i = 0; i < n; i++)
				array[i] = nextInt();

			return array;
		}

		int[][] nextIntMap(int n, int m) {
			int[][] map = new int[n][m];
			for (int i = 0; i < n; i++) {
				map[i] = in.nextIntArray(m);
			}
			return map;
		}

		long nextLong() {
			return Long.parseLong(next());
		}

		long[] nextLongArray(int n) {
			long[] array = new long[n];
			for (int i = 0; i < n; i++)
				array[i] = nextLong();

			return array;
		}

		long[][] nextLongMap(int n, int m) {
			long[][] map = new long[n][m];
			for (int i = 0; i < n; i++) {
				map[i] = in.nextLongArray(m);
			}
			return map;
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		double[] nextDoubleArray(int n) {
			double[] array = new double[n];
			for (int i = 0; i < n; i++)
				array[i] = nextDouble();

			return array;
		}

		double[][] nextDoubleMap(int n, int m) {
			double[][] map = new double[n][m];
			for (int i = 0; i < n; i++) {
				map[i] = in.nextDoubleArray(m);
			}
			return map;
		}

		String next() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		String[] nextStringArray(int n) {
			String[] array = new String[n];
			for (int i = 0; i < n; i++)
				array[i] = next();

			return array;
		}

		String nextLine() {
			int c = read();
			while (isEndline(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndline(c));
			return res.toString();
		}
	}
}

