#include<bits/stdc++.h>
using namespace std;
int main(){
int a,b,c;
cin>>a>>b>>c;
int k=0,i;
for(int j=1;j<=100000;j++){
if(a*10<b&&a!=0){
i=0;
a=a*10;
}
else{
a=a*10;
i=a/b;
a=a%b;
}
//cout<<a<<" "<<i<<endl;
if(i==c){
cout<<j<<endl;
return 0;
}
}
cout<<"-1"<<endl;
return 0;
}