#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
int a, b, c;
int main() {
  scanf("%d%d%d", &a, &b, &c);
  for (int i = 1; i <= 10000000; i++) {
    if (10 * a / b == c) {
      printf("%d\n", i);
      return 0;
    } else {
      a = 10 * a % b;
    }
  }
  printf("-1\n");
}
