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