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