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;
inline long long int read() {
  char c = getchar();
  long long int num, sign = 1;
  for (; c < '0' || c > '9'; c = getchar())
    if (c == '-') sign = -1;
  for (num = 0; c >= '0' && c <= '9';) {
    c -= '0';
    num = num * 10 + c;
    c = getchar();
  }
  return num * sign;
}
inline long long int pw(long long int b, long long int p) {
  long long int ans = 1;
  long long int i = 0;
  while (i < p) ans *= b, i++;
  return ans;
}
inline bool isPrime(long long int n) {
  if (n == 1) return false;
  if (n == 2) return true;
  if (!(n % 2)) return false;
  for (long long int i = 3; i <= sqrt(n); i += 2)
    if (!(n % i)) return false;
  return true;
}
inline long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int a = read(), b = read(), c = read();
  int cnt = 1, d;
  while (1) {
    a *= 10;
    if (a >= b || a == 0) {
      d = a / b;
      if (d == c) {
        cout << cnt << endl;
        return 0;
      }
      a = max(0, a - (d * b));
    } else if (a < b) {
      d = 0;
      if (d == c) {
        cout << cnt << endl;
        return 0;
      }
    }
    if (cnt > b) break;
    cnt++;
  }
  cout << -1 << endl;
  return 0;
}
