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 isPeriodic(y):
    val=y
    while(True):
        if(val%5==0):
            val=val/5
        elif(val%2==0):
            val=val/2
        else:
            return True
        if(val==1):
            return False

def largoDenominador(y):
    val = y
    i=1
    while (val!=0):
        val=val//10
        i+=1
    return i

def PF(x,y,z):
    i=1
    valor = 10
    periodico=isPeriodic(y)
    size=largoDenominador(y)
    while(1):
        fraction = (x*valor) // y
        modulo = (fraction % 10)//1
        if (modulo==z):
            return i
        elif(periodico==False and size==i):
            return -1
        if(periodico and i>10000):
            return -1
        valor*=10
        i+=1

aux1,aux2,aux3 =input().split(' ')
val1=int(aux1)
val2=int(aux2)
val3=int(aux3)
print(PF(val1,val2,val3))