#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int arr[100005] = {0};
  int rem = a % b;
  int pos = 1;
  int div = a / b;
  a *= 10;
  while (true) {
    div = a / b;
    if (div == c) {
      cout << pos << endl;
      break;
    }
    pos++;
    rem = a % b;
    if (arr[rem] == 1) {
      cout << -1 << endl;
      break;
    }
    arr[rem] = 1;
    a = rem * 10;
  }
}
