function Main(input) {
    ans = 0
    lines = input.split("\n")
    N = lines[0].split(" ")[0] * 1
    L = lines[0].split(" ")[1] * 1
    sum = 0
    diff = 0
    if (L > 0) {
        diff = -1 * L
    } else {
        if (N > Math.abs(L)) {
            diff = 0
        } else {
            diff = -1 * (L + N - 1)
        }
    }
    for(i =1; i <= N; i++) {
        sum += L + i - 1
    }
    ans = sum + diff
    console.log(ans)
    return ans
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));