"use strict"
function main(arg) {
    arg = arg.trim().split("\n")[0]
    var N = arg.split(" ").map(Number)[0]
    var L = arg.split(" ").map(Number)[1]
    // console.log([N,L])
    const absMin = (a, b) => {
        if (Math.abs(a) < Math.abs(b)) {
            return a
        }
        return b
    }
    var min = Number.MAX_VALUE
    var sum = 0
    for (var i = 1; i <= N; i++) {
        var t = L + i -1
        sum += t
        min = absMin(t, min)
    }
    console.log(sum - min)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));