void main(){ import std.stdio, std.string, std.conv, std.algorithm; import std.bigint; BigInt a, b, c; rd(a, b, c); bool ch(BigInt n){ auto sum=(n/a)*b+(n-n/a); return sum>=c; } BigInt ng=0, ok=1_000_000_000_000_000_000*2; while(ok-ng>1){ auto md=(ok+ng)/2; ch(md) ? ok : ng = md; } writeln(ok); } void rd(T...)(ref T x){ import std.stdio, std.string, std.conv; auto l=readln.split; assert(l.length==x.length); foreach(i, ref e; x){ e=l[i].to!(typeof(e)); } }