import std.stdio;
import std.conv;
import std.cstream;
import std.string;


void main(){
int a,b,n,ans;
char[] inc;
while(scanf("%d %d %d",&a,&b,&n) != EOF){
ans=0;
/+
a = cast(int)inc[0]-'0';
b = to!(int)(inc[2])-'0';
n = to!(int)(inc[4])-'0';
+/
char[] cans = to!(char[])(cast(double)a/b);

for(int i=2;i<n+2;i++){
if(i >= cast(int)cans.length)break;
ans+=cast(int)cans[i]-'0';
}
writeln(ans);

}






}