#include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
  int a, b, c;
  while (scanf("%d%d%d", &a, &b, &c) != EOF) {
    int mod = a % b * 10;
    int counter = 1;
    while (counter < b + 1) {
      if (mod / b == c) {
        printf("%d\n", counter);
        break;
      }
      counter++;
      mod = mod % b * 10;
      if (counter == b + 1) {
        printf("-1\n");
      }
    }
  }
  return 0;
}
