#include <bits/stdc++.h>
using namespace std;

using ll = long long;

void solve()
{
    int a, b, c;
    cin >> a >> b >> c;

    vector<bool> check(b, false);
    int rem = a % b;
    int count = 0;
    while (true)
    {
        rem *= 10;
        int digit = rem / b;
        count++;
        if (digit == c)
        {
            cout << count << endl;
            break;
        }
        rem = rem % b;

        if (check[rem] == true)
        {
            cout << -1 << endl;
            break;
        }
        else
        {
            check[rem] = true;
        }
    }
}

int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);

    solve();

    return 0;
}