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