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