#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 < 11234567; ++i) {
    a *= 10;
    int current = a / b;
    if (current == c) return !printf("%d\n", i);
    a %= b;
  }
  return !printf("%d\n", -1);
}
