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

public class MainB {
	public static void main(String [] args) {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		Task task = new Task();
		task.solve(1, in, out);
		out.close();
	}
	static class Task{
		public void solve(int testNumber,Scanner in,PrintWriter out) {
			int a = in.nextInt() * 10;
			int b = in.nextInt();
			int c = in.nextInt();
			List<Integer> list = new ArrayList<>();
			boolean flag = false;
			if(a < b) flag = true;
			while(list.size() < (int)1e5) {
				while(a < b) {
					a *= 10;
					if(flag) {
						list.add(0);
					}
					if(a < b && flag == false) {
						flag = true;
					}
				}
				flag = false;
				list.add(a / b);
				int k = a / b;
				int z = b * k;
				a = a - z;
				if(a == 0) {
					list.add(0);
					break;
				}
			}
			int h = 1;
			flag = false;
			
			for(int x : list) {
				if(x == c) {
					flag = true;
					break;
				}
				h++;
			}
			if(flag) {
				out.println(h);
			} else {
				out.println("-1");
			}
		}
	}
}
