#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c, q, t, bor = 0;
  cin >> a >> b >> c;
  t = 0;
  while (t <= b && bor == 0) {
    t++;
    if (10 * a / b == c) bor = 1;
    a = (10 * a) % b;
  }
  if (bor == 0)
    cout << -1;
  else
    cout << t;
  return 0;
}
