firstdata = input(); nexdata = firstdata.split(" "); sum = int(nexdata[0]); kaziri = int(nexdata[1]); result = 0; sum = sum - 2 * kaziri; while(sum > 0): sum = sum - 2 * kaziri; result = result + kaziri; print(result);