
import std.stdio;
import std.math;
import std.conv;
import std.string;
import std.algorithm;
import std.array;

void main() {
  while(true) {
    string line = readln.chomp;
    if (stdin.eof) break;
    uint[] data = line.split(" ").map!(to!(uint)).array;
    uint a = data[0];
    uint b = data[1];
    uint n = data[2];
    double div = cast(double) (a.to!(double) / b.to!(double));
    uint ans = 0;
    div = div - floor(div);
    for(uint i = 0; i < n; i++) {
      div *= 10;
      ans += floor(div);
      div = div - floor(div);
    }
    writeln(ans);
  }
}