#include <bits/stdc++.h>
using namespace std;
int kt[1000000];
int x, y = 0;
long long a, b, c;
int main() {
  cin >> a >> b >> c;
  a = a % b;
  a *= 10;
  memset(kt, false, sizeof(kt));
  while (kt[a] == false) {
    y++;
    kt[a] = true;
    x = a / b;
    if (x == c) {
      cout << y;
      return 0;
    }
    a = (a % b) * 10;
  }
  cout << -1;
  return 0;
}
