#include <bits/stdc++.h>
using namespace std;
int main() {
  long long a, b1, c, r = 0;
  cin >> a >> b1 >> c;
  for (int i = 1; i <= b1; i++) {
    a = a * 10;
    if (a / b1 == c) {
      r = i;
      break;
    }
    a = a % b1;
  }
  if (r)
    cout << r << endl;
  else
    cout << "-1" << endl;
  return 0;
}
