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