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