import std.stdio; import std.string, std.conv, std.array, std.algorithm; import std.uni; void main(){ auto line = readln.split.to!(int[]); auto L = line[0], K = line[1]; int ans = (L - 1) / (2*K) * K; writeln(ans); }