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;
int tc = 1;
vector<string> split(const string &s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.emplace_back(x);
  return move(v);
}
void err(vector<string>::iterator it) {}
template <typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
  cout << it->substr((*it)[0] == ' ', it->length()) << " = " << a << " ";
  err(++it, args...);
}
const int M = 1e9 + 7;
const long long Inf = (long long)2e18 + 5;
const int N = 2e5 + 5;
long long vis[N], res[N];
int solve() {
  int a, b, c;
  cin >> a >> b >> c;
  for (int i = 1; i < 1000000; i++) {
    a *= 10;
    if (a / b == c) {
      cout << i << endl;
      return 0;
    }
    a %= b;
  }
  cout << -1 << endl;
  return 0;
}
int main() {
  int test = 1;
  while (test--) solve();
  return 0;
}
