#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, dec, f = 0, i, rem, quo;
  cin >> a >> b >> c;
  rem = a % b;
  for (i = 1; i <= b; i++) {
    rem *= 10;
    quo = rem / b;
    if (quo == c) {
      f = 1;
      break;
    }
    rem = rem % b;
  }
  if (f) {
    cout << i;
  } else {
    cout << "-1";
  }
}
