l,k=map(int,input().split()) import math ans = math.floor((l-0.00001)/(2*k))*k print(ans)