#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int a, b, c;
  cin >> a >> b >> c;
  vector<int> dig;
  for (int i = 0; i < 1e6; i++) {
    a *= 10;
    dig.push_back(a / b);
    a %= b;
  }
  for (int i = 0; i < (int)dig.size(); i++) {
    if (dig[i] == c) {
      cout << i + 1;
      return 0;
    }
  }
  cout << -1;
}
