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 T bigmod(T p, T e, T M) {
  if (e == 0) return 1;
  if (e % 2 == 0) {
    T t = bigmod(p, e / 2, M);
    return (t * t) % M;
  }
  return (bigmod(p, e - 1, M) * p) % M;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T multimod(T a, T b, T m) {
  T ans = 0;
  a %= m, b %= m;
  while (b) {
    if (b & 1) ans = m - ans > a ? (ans + a) : (ans + a - m);
    b >>= 1;
    a = (m - a) > a ? a + a : a + a - m;
  }
  return (T)ans;
}
void sc(int &a) { scanf("%d", &a); }
void sc(long long &a) { scanf("%lld", &a); }
void sc(double &a) { scanf("%lf", &a); }
void sc(int &a, int &b) { scanf("%d %d", &a, &b); }
void sc(long long &a, long long &b) { scanf("%lld %lld", &a, &b); }
void sc(int &a, int &b, int &c) { scanf("%d %d %d", &a, &b, &c); }
void sc(int &a, int &b, long long &c) { scanf("%d %d %lld", &a, &b, &c); }
void sc(long long &a, long long &b, long long &c) {
  scanf("%lld %lld %lld", &a, &b, &c);
}
void sc(string &str) { cin >> str; }
void sc(char *(str)) { scanf(" %s", str); }
void sc(char &c) { scanf(" %c", &c); }
int main() {
  int k;
  int n, m;
  int t, i, j;
  cin >> n >> m >> k;
  n = n % m;
  int cnt = 0;
  while (1) {
    cnt++;
    n = n * 10;
    int d = n / m;
    if (d == k) {
      cout << cnt << endl;
      return 0;
    }
    n = n % m;
    if (cnt > 1e7) break;
  }
  cout << -1 << endl;
  return 0;
}
