def bite_eating(n, l)
  first = l
  last = l + n - 1
  taste = (first + last) * n / 2

  if 0 < first
    taste -= first
  elsif last < 0
    taste -= last
  end

  taste
end

n, l = gets.split.map(&:to_i)
puts bite_eating(n, l)