#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  for (long long i = 0; i <= b; ++i) {
    a *= 10;
    if (c == a / b) return cout << i + 1, 0;
    a = a % b;
  }
  cout << -1 << '\n';
  return 0;
}
