#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<sstream>
#include<iomanip>
#define rep(i,n) for(int i=0;i<n;i++) 
using namespace std;

int main(){
  int n; double a,b; string s;
  while(cin >> a >> b >> n){
    stringstream ss;
    ss << setiosflags(ios::fixed) << setprecision(10) << (a/b);
    ss >> s;
    int total = 0;
    rep(i,n)total += s[i+2]-'0';
    cout << total << endl;
  }
  return 0;
}