import math L,K=map(int,input().split()) print(math.floor(0.5*L/K)*K)