#include <bits/stdc++.h>
using namespace std;
int main() {
  int ctr = 1, a, b, c;
  cin >> a >> b >> c;
  int r = a % b;
  while (ctr <= b) {
    r = r * 10;
    int q = r / b;
    if (q == c) {
      cout << ctr;
      return 0;
    }
    r = r % b;
    ctr++;
  }
  cout << -1;
  return 0;
}
