You have a fraction <image>. You need to find the first occurrence of digit c into decimal notation of the fraction after decimal point.

Input

The first contains three single positive integers a, b, c (1 ≤ a < b ≤ 105, 0 ≤ c ≤ 9).

Output

Print position of the first occurrence of digit c into the fraction. Positions are numbered from 1 after decimal point. It there is no such position, print -1.

Examples

Input

1 2 0


Output

2

Input

2 3 7


Output

-1

Note

The fraction in the first example has the following decimal notation: <image>. The first zero stands on second position.

The fraction in the second example has the following decimal notation: <image>. There is no digit 7 in decimal notation of the fraction. 
#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9 + 100;
const int N = 1e6 + 10;
const long long mod = 998244353;
const int base = 131;
const double pi = acos(-1);
const double eps = 1e-8;
inline long long ksm(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = ans * a % mod;
    a = a * a % mod, b >>= 1;
  }
  return ans;
}
unordered_map<long long, long long> mp;
long long n, m, x, y, z, cx, k;
long long ans;
long long a[N], b[N], r[N], vis[N];
stack<int> st;
pair<int, int> p[N];
long long sum, cnt;
long long dp[1005][1005][5];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> m >> k;
  n = (n % m) * 10;
  for (int i = 1; i <= N; i++) {
    x = n / m;
    if (x == k) return cout << i, 0;
    n = (n % m) * 10;
  }
  cout << -1;
}
