N, L = gets.chomp.split(" ").map(&:to_i)

taste = []

(1..N).map{|i|
  taste[i-1] = L + i - 1
}

def minAbsPoint(ary)
  min_abs = ary[0].abs
  min_abs_point = 0
  (1...N).map{|i|
    if ary[i].abs < min_abs then
      min_abs = ary[i].abs
      min_abs_point = i
    end
  }
  min_abs_point
end

answer = taste[0...N].inject(:+) - taste[minAbsPoint(taste)]

p answer
