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. 
from decimal import *
k = raw_input()
k = k.split()
p1 = int(k[0])
p2 = int(k[1])
p3 = int(k[2])
getcontext().prec = 2000
po = str(Decimal(p1)/Decimal(p2*1.0))
flag = 0
po += "000"
# print po
poq = 0
ind1 = 0
ind2 = 0
#print po
for i in range (0,len(po)):
    if(poq == 1):
        if(int(po[i])==p3):
            ind2 = i
            flag = 1
            break
    if(po[i] == '.'):
        poq = 1
        ind1 = i
# print ind2-ind1, flag
if(flag == 0):
    print "-1"
else:
    if(ind2-ind1 >= 2000):
        print "-1"
    else:
        print ind2 - ind1
