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