#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, cnt = 0, imp = 0;
  cin >> a >> b >> c;
  while (1) {
    if (c == 0 && a == 0) {
      cout << cnt + 1;
      return 0;
    }
    if (a != 0) {
      a = a * 10;
      cnt++;
    }
    if (a / b == c) {
      cout << cnt;
      return 0;
    }
    a = a % b;
    if (a == 0) imp++;
    if (imp > 1000 || cnt > 100000) {
      cout << "-1";
      return 0;
    }
  }
  return 0;
}
