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.util.Scanner;

public class DMain {
    boolean is2And5(int k){
        while(k%2 == 0) k/=2;
        while(k%5 == 0) k/=5;
        return k == 1;
    }

    long[] createAmounts(int val, int n, long mod){
        long[] amounts = new long[n + 5];
        long[] totalAmounts = new long[n + 5];
        totalAmounts[1] = 9 / val % mod;
        totalAmounts[2] = 99 / val % mod;
        totalAmounts[3] = 999 / val % mod;

        amounts[1] = totalAmounts[1];
        amounts[2] = (totalAmounts[2] - totalAmounts[1]) % mod;
        amounts[3] = (totalAmounts[3] - totalAmounts[2]) % mod;
        long rem1000 = 999 / val * val % 1000;

        for(int i = 4; i <= n; ++i){
            rem1000 = (rem1000 * 10) % 1000;
            long c = (999 - rem1000) / val;
            rem1000 += c * val;
            totalAmounts[i] = (totalAmounts[i - 1] * 10 + c) % mod;
            amounts[i] = (totalAmounts[i] - totalAmounts[i - 1] + mod) % mod;
        }
        return amounts;
    }



    int[] digit10 = {1, 10, 100, 1000, 10000, 100000, 1000000, 10000000};
    public void solve() {
        Parser parser = new Parser();
        int n = parser.nextInteger();
        int k = parser.nextInteger();
        long mod = parser.nextLong();

        long[][] amounts = new long[n + 5][];
        int prev = 10*k;
        for(int i = 0; i <= n; ++i){
            int curr = prev;
            if(curr%2 == 0) curr /= 2;
            if(curr%5 == 0) curr /= 5;

            amounts[i] = curr == prev ? amounts[i - 1] : createAmounts(curr, n, mod);
            prev = curr;
        }
        long[] corrected = new long[n + 5];

        for(int i = 1; i <= n; ++i){
            corrected[i] = amounts[0][i];
            for(int j = 1; j < i; ++j){
                corrected[i] = (corrected[i] - corrected[j] * amounts[j][i - j] % mod + mod)%mod;
            }
        }

        long count = 0;
        for (int i = 1; i < n; ++i){
            count *= 10;
            count += corrected[i];
            count %= mod;
        }
        count *= 9;
        count += corrected[n];
        count %= mod;

        System.out.print(count);
    }
    public static void main(String[] args) {
        new DMain().solve();
    }

    static public class Parser{
        Scanner scanner;

        public Parser() {
            scanner = new Scanner(System.in);
        }

        public Parser(String str) {
            scanner = new Scanner(str);
        }

        long nextLong(){
            return scanner.nextLong();
        }

        int nextInteger(){
            return scanner.nextInt();
        }

        double nextDouble(){
            return scanner.nextDouble();
        }

        String nextLine(){
            return scanner.nextLine();
        }

        int[] nextIntegers(int count){
            int[] result = new int[count];
            for(int i = 0; i < count; ++i){
                result[i] = nextInteger();
            }
            return result;
        }

        long[] nextLongs(int count){
            long[] result = new long[count];
            for(int i = 0; i < count; ++i){
                result[i] = nextLong();
            }
            return result;
        }

        int[][] nextIntegers(int fields, int count){
            int[][] result = new int[fields][];
            for(int i = 0; i < fields; ++i){
                result[i] = new int[count];
            }
            for(int c = 0; c < count; ++c){
                for(int i = 0; i < fields; ++i){
                    result[i][c] = nextInteger();
                }
            }
            return result;
        }
    }

    static public class Matrix{
        static public final int size = 101;
        static public final long base = 1000000007;

        static public class Vector{
            long[] data = new long[size];
        }
        private long[] data;

        public Matrix() {
            data = new long[size * size];
        }

        long get(int row, int column){
            return data[row * size + column];
        }

        long set(int row, int column, long value){
            int index = row * size + column;
            long result = data[index];
            data[index] = value;
            return result;
        }

        public Matrix mul(Matrix other){
            Matrix result = new Matrix();
            for(int r = 0; r < size; ++r){
                for(int c = 0; c < size; ++c){
                    long value = 0;
                    for(int i = 0; i < size; ++i){
                        value += get(r, i) * other.get(i, c);
                        value %= base;
                    }
                    result.set(r, c, value);
                }
            }
            return result;
        }




    }
}
