using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Question63 { class Program { static void Main(string[] args) { int[] hoge = Console.ReadLine().Trim().Split(' ').Select(x => int.Parse(x)).ToArray(); int L = hoge[0]; int K = hoge[1]; int X = K * 2; int Z = L; int count = 0; int Ans = 0; do { Z = Z - X; count++; if (Z <= 0) { count--; } } while (Z > 0); Ans = K * count; Console.WriteLine(Ans); } } }