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