#include <bits/stdc++.h>
using namespace std;
int c;
int f(int a, int num, int b) {
  vector<int> v;
  while (v.size() != 1001) {
    num *= 10;
    v.push_back(num / b);
    num %= b;
  }
  int last = v.back();
  v.pop_back();
  bool change = 0;
  if (last >= 5) {
    v.back()++;
    if (v.back() == 10) {
      v.back() = 0;
      change = 1;
      for (int i = v.size() - 2; i >= 0; i--) {
        if (v[i] != 9) {
          v[i]++;
          change = 0;
          break;
        } else
          v[i] = 0;
      }
    }
  }
  if (v.size()) {
    for (int i = 0; i < v.size(); i++) {
      if (v[i] == c) return i + 1;
      if (i >= 500) break;
    }
    return -1;
  } else
    return 1;
}
int main() {
  int a, b;
  scanf("%d %d %d", &a, &b, &c);
  cout << f(a, a % b, b) << '\n';
  return 0;
}
