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. 
def convert(numerator, denominator):
    # https: // ideone.com / kx8KCJ

    integer_part = str(numerator // denominator)
    ans = ''
    l = dict()
    i = 0

    numerator = numerator % denominator
    l[numerator] = i
    i += 1

    if numerator == 0:
        # return integer_part
        return '0'

    while True:
        if numerator == 0:
            # return '{}.{}'.format(integer_part, ans)
            return str(ans) + '0'

        digit, numerator = divmod(numerator * 10, denominator)
        ans += str(digit)
        if numerator not in l:
            l[numerator] = i
            i += 1
        else:
            # return '{}.{}({})'.format(integer_part, ans[:l[numerator]], ans[l[numerator]:])
            return ''.join((str(ans[:l[numerator]]), str(ans[l[numerator]:])))


a, b, c = map(int, input().split())

s = convert(a, b)
try:
    print(s.index(str(c)) + 1)
except ValueError:
    print(-1)
