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. 
#include <bits/stdc++.h>
using namespace std;
long long fac[2000009], not_prime[2000009];
long long power(long long x, long long n) {
  if (n == 0) return 1;
  if (n % 2 == 0)
    return power((x * x), n / 2);
  else
    return (x * power((x * x), (n - 1) / 2));
}
void fact() {
  fac[0] = 1;
  for (long long i = 1; i < 2000009; i++)
    fac[i] = (i * fac[i - 1]) % 1000000007;
}
void sieve() {
  not_prime[1] = 1;
  not_prime[0] = 1;
  for (long long p = 2; p * p < 2000009; p++) {
    if (!not_prime[p]) {
      for (long long i = p * 2; i <= 2000009; i += p) not_prime[i] = 1;
    }
  }
}
long long modi(long long a, long long m) {
  long long m0 = m, t, q;
  long long x0 = 0, x1 = 1;
  if (m == 1) return 0;
  while (a > 1) {
    q = a / m;
    t = m;
    m = a % m, a = t;
    t = x0;
    x0 = x1 - q * x0;
    x1 = t;
  }
  if (x1 < 0) x1 += m0;
  return x1;
}
long long n, m, id[2000009], st[2000009];
int main() {
  long long i, j, r, k, l, c, test, flag, ans1, ans2, a, b;
  string s;
  cin >> a >> b >> c;
  a %= b;
  for (i = 1; i <= 1000000; i++) {
    a *= 10;
    if (a / b == c) {
      cout << i;
      return 0;
    }
    a %= b;
  }
  cout << "-1";
  return 0;
}
