a,b=[int(i) for i in input().split()] c=a//2 d=c//(b*2) print(d*b*2)