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. 
"""
NTC here
"""
from sys import setcheckinterval, stdin, setrecursionlimit
setcheckinterval(1000)
setrecursionlimit(10**7)
 
# print("Case #{}: {} {}".format(i, n + m, n * m))
 
 
def iin(): return int(stdin.readline())
 
 
def lin(): return list(map(int, stdin.readline().split()))


a,b,c=lin()
ch=0
ch1=0
count=0
ch=a//b
a,b=a%b*10,b
while count < 10000:
    
    count+=1
    if ch==a//b:
        ch1+=1
    else:
        ch1=0
    ch=a//b
    a,b=a%b*10,b
    #print(a,b,ch)
    if ch==c:
        print(count)
        break
    
    
else:
    if ch==c :
        print(count)
        
    print(-1)

