using System; public class Paiza { public static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var L = int.Parse(line[0]); var k = int.Parse(line[1]); Console.WriteLine((L - 1) / (2 * k) * k); } }