import std.algorithm, std.array, std.container, std.range, std.bitmanip; import std.numeric, std.math, std.bigint, std.random; import std.string, std.conv, std.stdio, std.typecons; void main() { auto rd = readln.split.map!(to!int); auto h = rd[0], a = rd[1], d = rd[2]; auto maxCa = h / a + (h % a == 0 ? 0 : 1); auto minE = h.to!real; foreach (ca; 0..maxCa + 1) { auto e = calc(h, a, d, ca); minE = min(minE, e); } writefln("%f", minE); } real calc(int h, int a, int d, int ca) { h -= a * ca; auto e = ca.to!real; if (h > 0) e += (h / d + (h % d == 0 ? 0 : 1)).to!real * 3 / 2; return e; }