#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int a, b, r, n = -1, c, i = 0;
  cin >> a >> b >> c;
  r = a % b;
  while (n != c && i < 1000001) {
    a = a * 10;
    n = a / b;
    a = a - n * b;
    i++;
  }
  if (n == c)
    cout << i << endl;
  else
    cout << "-1" << endl;
  return 0;
}
