#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  map<int, int> mapa;
  a %= b;
  a *= 10;
  int cont = 0;
  while (!mapa[a]) {
    if (a / b == c) {
      printf("%d\n", cont + 1);
      return 0;
    }
    mapa[a] = ++cont;
    a %= b;
    a *= 10;
  }
  printf("-1\n");
  return 0;
}
