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. 
/*input
10007 107 0
*/
import java.util.Scanner;
import java.math.BigInteger;
import java.util.Arrays;
import java.math.BigDecimal;
public class Main {
	static public void main(String[] args) {
		Scanner in = new Scanner(System.in);
		BigDecimal a = new BigDecimal(in.next());
		BigDecimal b = new BigDecimal(in.next());
		char c = in.next().charAt(0);
		BigDecimal d = a.divide(b, 200000, BigDecimal.ROUND_DOWN);
		String s = new String("" + d);
		//System.out.println(s + "  " + c);
		//return;
		int i = 0; 
		boolean u = true;
		while(s.charAt(i) != '.') i++;
		for(int j = 1; j + i < s.length(); j++) {
			//System.out.println(s.charAt(i + j));
			if(s.charAt(i + j) == c) {
				System.out.println(j);
				u = false;
				break;
			}
		}
		if(u) System.out.println("-1");
	}
}