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. 
/**
 * Created by 11096 on 2018/2/4.
 */
import java.math.BigDecimal;
import java.util.Scanner;
public class Main {
    public static void main(String[]args)
    {
        Scanner in=new Scanner(System.in);
        BigDecimal a=in.nextBigDecimal();
        BigDecimal b=in.nextBigDecimal();
        String c=in.next();
        BigDecimal ans=a.divide(b,1000,BigDecimal.ROUND_HALF_UP);
        String s=ans.toPlainString();
        //System.out.println(s);
        int i;
        for(i=0;i<s.length();i++)
        {
            if(s.charAt(i)=='.')break;
        }
        boolean flag=false;
        int idx;
        for(idx=1;i+idx<s.length()-1;idx++)
        {
            if(s.charAt(idx+i)==c.charAt(0))
            {
                flag=true;
                break;
            }
        }
        //System.out.println(flag);
        if(flag==true)System.out.println(idx);
        else System.out.println(-1);

    }
}
