#include <bits/stdc++.h>
using namespace std;
const long long LE5 = 100000;
const long long MAXN = LE5 * 10 + 50;
int side[4];
int main() {
  int a, b, c;
  scanf("%d%d%d", &a, &b, &c);
  for (int i = 0; i < MAXN; i++) {
    a *= 10;
    int cur = a / b;
    a = a % b;
    if (cur == c) {
      cout << i + 1 << endl;
      return 0;
    }
  }
  cout << -1 << endl;
}
