L,K=map(int,input().split()) i=int((L-0.1)/(2*K)) print(K*i)