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


void main(){
int a,b,n,ans;
  while(scanf("%d %d %d",&a,&b,&n) != EOF){
  ans=0;
  char[] cans = to!(char[])(cast(double)a/b);
    
    for(int i=2;i<n+2;i++){
      if(i >= cast(int)cans.length)break;
      //printf("f(%d) = %c\n",i-1,cans[i]);
      ans+=cast(int)cans[i]-'0';
    }
  writeln(ans);

  }

}