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