L, K = map(int,input().split()) result = 0 while True: if L - K*2 >= 1: L -= K*2 result += K else: break print(result)