#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int a, b, c;
  cin >> a >> b >> c;
  for (int i = 0; i <= b; ++i) {
    a *= 10;
    if (a / b == c) return cout << ++i, 0;
    a %= b;
  }
  cout << -1;
}
