#include<stdio.h>
#include<iostream>
#include<list>
#include<map>
#include<vector>
#include<algorithm>
#include<string.h>
#define range(i,a,b) for(int i = (a); i < (b); i++)
#define rep(i,b) range(i,0,b)
#define debug(x) cout << x << endl;
using namespace std;

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