#include <iostream>
#include <stdio.h>
#include <cstdio>
using namespace std;
int main(){
	int a,b,n;
	double d;
	while(scanf("%d %d %d",&a,&b,&n)!=EOF){
		int s=0;
		d=a/b;
		for(int i=0;i<n;i++){
			d *= 10;
			int x=d;
			s += x%10;
			
		}
		cout<<s<<endl;
	}
	return 0;
}