import math l, b = input().split() L = int(l) B = int(b) if L / (2 * B) <= 1: count = 0 elif L / (2 * B) >1: if L % (2 * B) == 0: count = L/(2*B) - 1 else: count = math.floor(L/(2*B)) print(int(count * B))