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