l, k = map(int, input().split()) count = 0 while 1: if l - 2 * k > 0: l = l - 2 * k count += 1 else: break print(k * count)