#include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int main(void)
{
  long long int a,b,n;
  while(cin >> a >> b >> n){
    int sum = 0;
    for(int i = 0; i < n; i++){
      a *= 10;
      sum  += (a/b)%10;
      a %= b;
    }
    cout << sum << endl;
  }
}