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