#include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <cstdio>
#include <functional>
#include <set>
#include <sstream>
#include <map>
 
using namespace std;
 
const double eps=1e-10;

int main()
{

	int a,b,n;
	while(cin>>a>>b>>n){
		a%=b;

		long long res=0;
		for(int i=0;i<n;i++){
			a*=10;
			res+=a/b;
			a%=b;
		}

		cout<<res<<endl;

	}


	return 0;
}