L,K=map(int,input().split()) if K==0:print(0) else:print(K*(L//(2*K)))