# Here your code ! L, K = gets.chomp.split.map(&:to_i) t = L/K l = L%K puts (t - t%2)/2*K