#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e5 + 10;
const long long inf = 1e18;
const long long mod = 1e9 + 7;
long long a, b, c, cnt, ans;
int main() {
  cin >> a >> b >> c;
  for (int i = 0; i < maxn; i++) {
    if (a < b) {
      a *= 10;
    }
    cnt = a / b;
    if (cnt == c) {
      cout << i + 1 << endl;
      return 0;
    }
    a %= b;
  }
  cout << -1 << endl;
  return 0;
}
