using System; using System.Linq; class Program { static void Main(string[] args) { int[] LK = Console.ReadLine().Split(' ').Select(s => int.Parse(s)).ToArray(); int yuu = 0; while (0 <= LK[0] - LK[1] * 2) { yuu += LK[1]; LK[0] -= LK[1] * 2; } Console.WriteLine(yuu); } }