long,eat=map(int,input().split()) ceat=long/(eat*2) if ceat==1: print(0) else: print(int(ceat)*eat)