using System; using System.Linq; class Program { static void Main(string[] args) { int[] array = Console.ReadLine().Split(' ').Select(a => int.Parse(a)).ToArray(); int mm = 0; int width = array[0]; while (true) { width -= array[1] * 2; if (width <= 0) { break; } mm += array[1]; } Console.WriteLine(mm); } }