using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace yukicoder { class Program { static void Main(string[] args) { int L = int.Parse(Console.ReadLine()); int K = int.Parse(Console.ReadLine()); int haruka = 0; int c = L; while(0 <= L) { if(L - (K * 2) <= K * 2) { haruka += L; } L -= (K * 2); haruka++; } Console.WriteLine("{0}", (c-haruka)); //Console.ReadLine(); } } }