#include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int a,b,n,sum;
  while(scanf("%d %d %d",&a,&b,&n)!=EOF){
    sum = 0;
    for(int i=0,k=a%b*10;i<n;i++){
      sum += k/b;
      k = k % b * 10;
    }
    cout << sum << endl;
  }
}