L, K = map(int,input().split()) print([K*(L//(2*K)),0][L <= 2*K])