#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
const double EPS = 1e-9;
int ar[] = {1, -1, 0, 0, 1, 1, -1, -1};
int ac[] = {0, 0, 1, -1, 1, -1, 1, -1};
int main() {
  ios_base::sync_with_stdio(false);
  int a, b, c;
  cin >> a >> b >> c;
  int cnt = 2000;
  for (int i = 1; i <= cnt; i++) {
    a *= 10;
    if (a < b) {
      if (c == 0) return cout << i << "\n", 0;
      while (a > 0 && a < b) {
        a *= 10;
        i++;
      }
    }
    if (c == a / b) return cout << i << "\n", 0;
    a %= b;
  }
  cout << "-1\n";
  return 0;
}
