#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;

int main(){
	while(cin >> a >> b >> n){
		int s = 0;
		a = a%b;
		for(int i = 1; i <= n; i++){
			a = a*10;
			s += a/b;
			a = a%b;
		}
		cout << s << endl;
	}
}