#include <bits/stdc++.h>
using namespace std;
const int mod = int(1e9) + 7;
const int maxn = int(1e5) + 100;
int main() {
  int a, b, c;
  while (~scanf("%d%d%d", &a, &b, &c)) {
    bool flag = false;
    for (int i = 1; i < b + 1; i++) {
      a = a * 10;
      if (a / b == c) {
        printf("%d\n", i);
        flag = true;
        break;
      }
      a %= b;
    }
    if (!flag) printf("-1\n");
  }
}
