#include <bits/stdc++.h>
using namespace std;
int main() {
  long int a, b, c;
  string s;
  cin >> a >> b >> c;
  int d, f, e, g;
  int arr[100];
  for (int i = 0; i < 1000; i++) {
    d = (a * 10) / b;
    a = (a * 10) % b;
    if (d == c) {
      cout << i + 1;
      exit(0);
    }
  }
  cout << -1;
  return 0;
}
