import std.stdio, std.string, std.conv, std.algorithm, std.range, std.array, std.typecons, std.math;

void main() {
    long n, l;
    readf("%d %d\n", &n, &l);


    long x = 0;
    long m = 999999;
    long y = 0;
    foreach(i; 0..n) {
        x += l + i;
        if (m > abs(l+i)) {
            y = l+i;
            m = abs(l+i);
        }
    }

    writeln(x - y);
}
