#include <cstdio>
#include <cstring>
#include <algorithm>
#include <string>
#include <cmath>
#include <stack>
#include <vector>
#include <map>
#include <set>
#include <iostream>
#include <climits>
#include <cfloat>


using namespace std;


int main()
{
	int a, b, n;
	while (scanf("%d %d %d\n", &a, &b, &n) != EOF)
	{
		int s = 0;
		a %= b;
		for (int i = 0; i < n; ++i)
		{
			a *= 10;
			if (a >= b)
			{
				s += a/b;
				a %= b;
			}
		}
		printf("%d\n", s);
	}

	return 0;
}