#include <bits/stdc++.h>
using namespace std;
string sss = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
void solve(long long CS) {
  long long a, b, c, i, j;
  cin >> a >> b >> c;
  for (i = 1; i <= 100000; i++) {
    a *= 10;
    int now = a / b;
    if (now == c) {
      cout << i << endl;
      return;
    }
    a %= b;
  }
  cout << -1 << endl;
}
int main() {
  long long t, no = 0;
  t = 1;
  while (t--) solve(++no);
}
