
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];
    uint sum = 0;
    a %= b;
    for(uint i = 0; i < n; i++) {
      a *= 10;
      sum += a / b;
      a %= b;
      if (a == 0) break;
    }
    writeln(sum);
  }
}