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>
#pragma GCC optimize("O3")
using namespace std;
const int INF = 1e9 + 7;
const long long LINF = 1000000000000000001LL;
const long double EPS = 1e-9;
const long double PI = 3.141592653589793;
inline void hi(void) {
  cout << fixed << setprecision(16);
  cerr << fixed << setprecision(16);
  srand(INF);
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
inline void bye(void) { exit(0); }
vector<string> ans;
signed main() {
  hi();
  const int BREAK = 1e5;
  int a, b, c;
  cin >> a >> b >> c;
  unordered_set<int> was;
  int now = a;
  int i;
  for (i = 0; i < BREAK; ++i) {
    if (now < b) {
      now *= 10;
    }
    if (now / b == c) {
      cout << i + 1 << "\n";
      break;
    }
    if (was.count(now)) {
      cout << -1 << "\n";
      break;
    }
    was.insert(now);
    now %= b;
  }
  bye();
}
