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) { int[] tmp = Console.ReadLine().Trim().Split(' ').Select(x => int.Parse(x)).ToArray(); // ポッキーの長さ int L = tmp[0]; // 1回でかじる長さ(mm) int K = tmp[1]; int count = 0; while (true) { if(L <= K*2) { break; } L -= K * 2; count++; } Console.WriteLine(K*count); } } }