#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  double t;
  t = (a / b);
  int x;
  x = 1e6;
  int flag = 0;
  while (x--) {
    int temp;
    a *= 10;
    temp = (a / b) % 10;
    if (temp == c) {
      flag = 1;
      break;
    }
    a %= b;
  }
  cout << (flag == 0 ? -1 : 1e6 - x);
  return 0;
}
