import std.stdio, std.algorithm, std.string, std.string, std.conv, std.array, std.range, std.math; long A, B, C; bool can(long age) { long x = age / A; long y = age - x; return x * B + y >= C; } void main() { auto input = readln.split.to!(long[]); A = input[0]; B = input[1]; C = input[2]; long lb = -1, ub = 10L^^18; while (ub - lb > 1) { long mid = (lb + ub) / 2; if (can(mid)) ub = mid; else lb = mid; } writeln(ub); string _ = readln(); // dbg }