type ABC(stream:System.IO.TextReader) =
  member this.Scan2 f1 f2 = stream.ReadLine().Split() |> (fun a -> (f1 a.[0], f2 a.[1]))

let util = ABC(stdin)

let N, L = util.Scan2 int int
let xs = [1..N] |> List.map (fun i -> L + i - 1)
let tot = List.sum xs
let eat = List.minBy abs xs

printfn "%d" <| tot - eat
