using System; using System.Text; using System.Linq; namespace ConsoleApp11 { class Program { static void Main(string[] args) { long sum = 0; var input = Console.ReadLine().Split(' '); long L = long.Parse(input[0]); long K = long.Parse(input[1]); while (true) { if(L <= K * 2) { break; } L -= K * 2; sum += K; if(L <= K * 2) { break; } } Console.WriteLine(sum); } } }