#include<iostream>
using namespace std;

int main() {
  int a,b,n;
  while(cin>>a>>b>>n) {
    double t = (double)a/b;
    int sum = 0;
    for(int i=0; i<n; i++) {
      t *= 10;
      sum += ((int)t)%10;
    }
    cout<<sum<<endl;
  }
}