#include <bits/stdc++.h>
using namespace std;
string fractionToDecimal(int numr, int denr) {
  string res;
  map<int, int> mp;
  mp.clear();
  int rem = numr % denr;
  while ((rem != 0) && (mp.find(rem) == mp.end())) {
    mp[rem] = res.length();
    rem = rem * 10;
    int res_pat = rem / denr;
    char res_part = res_pat + '0';
    res += res_part;
    rem = rem % denr;
  }
  if (rem == 0) res = res + '0';
  return res;
}
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  char d;
  d = c + '0';
  string res = fractionToDecimal(a, b);
  long long int i = 0, flag = 0;
  while (i != res.length()) {
    if (res[i] == d) {
      flag = 1;
      cout << i + 1;
      break;
    }
    i++;
  }
  if (flag == 0) cout << -1;
  return 0;
}
