#include <bits/stdc++.h>
using namespace std;
void positionInFraction();
int main() {
  positionInFraction();
  return 0;
}
void positionInFraction() {
  int b, c, rpta, division, d;
  long long a, posicion;
  cin >> a >> b >> c;
  bool hayRpta = false;
  posicion = 1;
  while (posicion < 100000 and !hayRpta) {
    a = a * 10;
    division = a / b;
    if (division % 10 == c) {
      cout << posicion;
      hayRpta = true;
      break;
    }
    a = a % b;
    posicion++;
  }
  if (hayRpta) {
  } else {
    cout << -1;
  }
}
