#include <bits/stdc++.h>
using namespace std;
const int M = 3 * 1e5 + 1;
const int BIG = 2 * 1e9 + 1;
const long long INF = 2 * 1e18;
const long long MOD = 1e9 + 7;
const int two = 2;
const int four = 4;
const double pi = acos(-1.0);
const double eps = 1e-5;
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  a %= b;
  for (int i = 0; i < 100000; i++) {
    int x = (10 * a) / b;
    if (x == c) {
      cout << i + 1;
      return 0;
    }
    a = (10 * a) % b;
  }
  cout << "-1";
  return 0;
}
