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