#include<iostream>
#include<cmath>
using namespace std;
int main() {
int a, b, n, answer;
cin >> a >> b >> n;
double temp = a*1.0 / b;
temp-=int(temp);
for (int i = 0; i < n-1; i++) {
temp = temp * 10 - int(temp * 10);
}
answer = int(temp * 10);
cout << answer;
return 0;
}