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