L,K=map(int,input().split()) s=0 while 1: if L-K*2<=0: break else: L-=K*2 s+=1 print(K*s)