#include<iostream>
using namespace std;

int main(){
		int a,b,n,amari,ans=0;
		while(cin>>a){
			ans=0;
			cin>>b>>n;
			int dt[n+1];
			dt[0]=a/b;
			amari=a%b*10;
			for(int i=1;i<n+1;i++){
				dt[i]=amari/b;
				amari=amari%b*10;
				ans+=dt[i];
			}
			cout<<ans<<endl;
		}
		return 0;
}