using System; using System.Linq; class Program { static void Main() { int[] n = Console.ReadLine().Split().Select(int.Parse).ToArray(); int ans = 0; while ((n[0] -= n[1] * 2) > 0) { ans += n[1]; } Console.WriteLine(ans); } }