using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace lecture { class Program { static void Main(string[] args){ string[] line = Console.ReadLine().Split(' '); int L = int.Parse(line[0]); int K = int.Parse(line[1]); int count = 0; while ( L > 2 * K ) { L -= 2 * K; count += K; } Console.WriteLine(count); } } }