#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, l = 1, i, p = 1, oa, r;
  scanf("%d%d%d", &a, &b, &c);
  while (1) {
    for (oa = a, i = 0; i < l; i++, p++) {
      r = 10 * a / b;
      if (r == c) break;
      a = 10 * a - r * b;
      if (a == oa) break;
    }
    if (r == c) {
      printf("%d\n", p);
      break;
    } else if (a == oa) {
      printf("-1\n");
      break;
    } else {
      oa = a;
      l *= 2;
    }
  }
  return 0;
}
