#include <iostream>
#include <cstdio>
using namespace std;

int main(){
    double a,b;
    int n;
    char s[100];
    int cnt;
    int total;
    while(cin >> a >> b >> n){
        cnt = 0;
        total = 0;
        a /= b;
        sprintf(s,"%lf",a);
        while(1){
            if(s[cnt] == '.'){
                for(int i=cnt+1;i<=cnt+n;i++) total += (s[i]-'0');
                break;
            }
            cnt++;
        }
        cout << total << endl;
    }
}