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;
template <class T>
inline bool read(T &ret) {
  char c;
  int sgn;
  if (c = getchar(), c == EOF) return false;
  while (c != '-' && (c < '0' || c > '9')) c = getchar();
  sgn = (c == '-') ? -1 : 1;
  ret = (c == '-') ? 0 : (c - '0');
  while (c = getchar(), c >= '0' && c <= '9') ret = ret * 10 + (c - '0');
  ret *= sgn;
  return true;
}
template <class T>
inline void output(T answer) {
  if (answer < 0) {
    putchar('-');
    answer = -answer;
  }
  if (answer >= 10) output(answer / 10);
  putchar(answer % 10 + '0');
  return;
}
inline long long addMod(long long x, long long y, long long mod) {
  x += y;
  if (x > mod) x -= mod;
  return x;
}
inline long long minusMod(long long x, long long y, long long mod) {
  x -= y;
  if (x < 0) x += mod;
  return x;
}
inline long long qmul(long long, long long, long long);
inline long long qpow_qmul(long long, long long, long long);
inline long long mul(long long, long long, long long);
inline long long qpow(long long, long long, long long);
inline long long gcd(long long, long long);
inline long long qpow_mul(long long, long long, long long);
const int N = 1e5 + 10;
const int M = 1e2 + 5;
const long long INF = 1e14 + 2;
const long long mod = 1e9 + 7;
const double PI = acos(-1.0);
const double esp = 1e-7;
const int MAXN = 2e5 + 5;
int main() {
  int a, b, c, cur;
  scanf("%d%d%d", &a, &b, &c);
  int cnt = 0, idx = -1;
  for (int i = 1; i <= b; i++) {
    a *= 10;
    cur = a / b;
    cnt++;
    if (cur == c) {
      idx = cnt;
      break;
    }
    a %= b;
  }
  printf("%d\n", idx);
  return 0;
}
inline long long mul(long long a, long long b, long long MOD) {
  long long L = a * (b >> 25ll) % MOD * (1ll << 25) % MOD;
  long long R = a * (b & ((1ll << 25) - 1)) % MOD;
  return (L + R) % MOD;
}
inline long long qpow_mul(long long x, long long n, long long MOD) {
  long long ans = 1, a = x % MOD;
  while (n) {
    if (n & 1) {
      ans = mul(ans, a, MOD);
    }
    a = mul(a, a, MOD);
    n >>= 1;
  }
  return ans;
}
inline long long qmul(long long a, long long b, long long MOD) {
  long long ans = 0, x = a;
  while (b) {
    if (b & 1) {
      ans = (ans + x) % MOD;
    }
    x = x * 2 % MOD;
    b >>= 1;
  }
  return ans % MOD;
}
inline long long qpow_qmul(long long x, long long n, long long MOD) {
  long long ans = 1, a = x % MOD;
  while (n) {
    if (n & 1) {
      ans = qmul(ans, a, MOD);
    }
    a = qmul(a, a, MOD);
    n >>= 1;
  }
  return ans;
}
inline long long qpow(long long x, long long n, long long MOD) {
  if (x == 1) return 1;
  long long ans = 1, a = x;
  while (n) {
    if (n & 1) {
      ans = ans * a % MOD;
    }
    a = a * a % MOD;
    n >>= 1;
  }
  return ans;
}
inline long long gcd(long long m, long long n) {
  return n == 0 ? m : gcd(n, m % n);
}
