#include <bits/stdc++.h>
int main() {
  int a, b, c, n = 0;
  scanf("%d%d%d", &a, &b, &c);
  a %= b;
  while (++n < 5000000) {
    a *= 10;
    if (a / b == c) {
      printf("%d\n", n);
      return 0;
    }
    a %= b;
  }
  printf("-1\n");
  return 0;
}
