const fi='int.input';
fo='int.output';
var a, b, k : longint ;
so : real ;
f1, f2 : text ;
function lt(n: byte) : byte ;
begin
lt := round(exp(n*ln(10)));
end ;
begin
assign(f1,fi) ; assign(f2,fo);
reset(f1) ; rewrite(f2);
read(f1, a, b, k) ; close(f1);
so := a / b ;
write(f2,round(so*lt(k)) mod lt(k-1));
close(f2);
end .