using System; using System.Linq; class Sample { public static void Main() { var pokky = Console.ReadLine().Trim().Split(" ") .Select(int.Parse).ToList(); int num = pokky[0] / (2 * pokky[1]); Console.WriteLine(num==0?(num-1)*pokky[1]: pokky[1]*num); } }