l, k = gets.split.map(&:to_i) puts (l - 1 / (2 * k)) * k