#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
using namespace std;
typedef long long ll;
int main(){
  ll a,b,n;

  while(~scanf("%lld %lld %lld",&a,&b,&n)){
    ll res=0;
    a*=10;
    for(ll i=0;i<n;i++){
      int d=a/b;
      res+=(d%10);
      a=((a-(d%10)*b)*10)%1000000000;
    }
    printf("%lld\n",res);
  }
}