You have a fraction <image>. You need to find the first occurrence of digit c into decimal notation of the fraction after decimal point.

Input

The first contains three single positive integers a, b, c (1 ≤ a < b ≤ 105, 0 ≤ c ≤ 9).

Output

Print position of the first occurrence of digit c into the fraction. Positions are numbered from 1 after decimal point. It there is no such position, print -1.

Examples

Input

1 2 0


Output

2

Input

2 3 7


Output

-1

Note

The fraction in the first example has the following decimal notation: <image>. The first zero stands on second position.

The fraction in the second example has the following decimal notation: <image>. There is no digit 7 in decimal notation of the fraction. 
//package com.example.programmingpractice;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Scanner;

public class CodeforcesNT {

    static String[] sTakeInputs;
    static int sIntInputPos = 0;
    static int sLongInputPos = 0;
    static BufferedReader sBufferedReader;

    static int[] scanIntArray() throws Exception{
        String[] inputs = sBufferedReader.readLine().trim().split(" ");
        int[] arr = new int[inputs.length];
        for(int i = 0; i<inputs.length; i++) arr[i] = Integer.parseInt(inputs[i]);
        return arr;
    }

    static long[] scanLongArray() throws Exception{
        String[] inputs = sBufferedReader.readLine().trim().split(" ");
        long[] arr = new long[inputs.length];
        for(int i = 0; i<inputs.length; i++) arr[i] = Long.parseLong(inputs[i]);
        return arr;
    }

    static int scanInt() throws Exception{
        return Integer.parseInt(sBufferedReader.readLine().trim());
    }

    static long scanLong() throws Exception{
        return Long.parseLong(sBufferedReader.readLine().trim());
    }

    static int nextInt() throws Exception {
        if(sIntInputPos == 0) sTakeInputs = sBufferedReader.readLine().trim().split(" ");
        if(sTakeInputs.length <= sIntInputPos) {
            System.out.println("Warning input limit exceeded!!!"); return 0;
        }
        return Integer.parseInt(sTakeInputs[sIntInputPos++]);
    }



    static long nextLong() throws Exception {
        if(sLongInputPos == 0) sTakeInputs = sBufferedReader.readLine().trim().split(" ");
        if(sTakeInputs.length <= sLongInputPos) {
            System.out.println("Warning input limit exceeded!!!"); return 0;
        }
        return Integer.parseInt(sTakeInputs[sLongInputPos++]);
    }

    public static void main (String[] args) throws Exception{
        sBufferedReader = new BufferedReader(new InputStreamReader(System.in));
        int a = nextInt();
        int b = nextInt();
        int c = nextInt();
        a %= b;
        int pos = -1;
        int cur = 1;
        while(cur<1000) {
            a*=10;
            int x = a/b;
            if(x == c) {pos = cur; break;}
            cur++;
            a %= b;
        }
        System.out.println(pos);
    }
}
