#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <sstream>
#include <vector>
#include <string>
#include <iomanip>
#include <bitset>
#define INF	100000000
#define pb	push_back
#define fi first
#define sec second
#define SS stringstream
using namespace std;
typedef pair<int, int> P;
typedef long long int	ll;

int a, b, n;
double af, bf;

int main(){
	while(scanf("%d%d%d", &a, &b, &n)){
		int ans = 0;
		double x;
		af = (double)a; bf = (double)b;
		x = af/bf;
		for(int i = 1; i <= n; i++){
			ans += ((int)(x*pow(10,i)))%10;
		}
		cout << ans << endl;
	}
}