#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  int a, b, c;
  cin >> a >> b >> c;
  for (int i = 1; i <= b; ++i) {
    a *= 10;
    int dig = a / b;
    if (dig == c) {
      cout << i << "\n";
      return 0;
    }
    a %= b;
  }
  cout << "-1\n";
  return 0;
}
