#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int r = a % b;
  int i;
  for (i = 1; i <= b + 1; i++) {
    a = (r * 10) / b;
    r = (r * 10) % b;
    if (a == c) {
      cout << i;
      break;
    }
  }
  if (i == b + 2) cout << -1;
}
