#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " |";
  __f(comma + 1, args...);
}
const int INF = 1 << 29;
const int MOD = 1e9 + 7;
const int N = 1e5 + 10;
bool visit[N];
int main() {
  int a, b, c;
  cin >> a >> b >> c;
  int cur = a % b * 10;
  for (int k = 0;; ++k) {
    int q = cur / b;
    if (q == c) {
      printf("%d\n", k + 1);
      return 0;
    }
    cur %= b;
    if (visit[cur]) break;
    visit[cur] = true;
    cur *= 10;
  }
  puts("-1");
  return 0;
}
