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