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