L,K=map(int, input().split()) i=0 Y=0 while L>0: L-=2*K Y+=K print(Y)