N,L = list(map(int,input().split()))

A = [L+i for i in range(N)]

x = 10**9

y = -1

for a in A:

    if abs(a) < x:

        x = abs(a)

        y = a

print((sum(A) - y))
N,L = list(map(int,input().split()))

R = L+N-1

if L <= 0 <= R:

    print((sum(range(L,R+1))))

elif L > 0:

    print((sum(range(L+1,R+1))))

else:

    print((sum(range(L,R))))

N, L = list(map(int, input().split()))
A = [L + i for i in range(N)]
x = 10**9
y = -1
for a in A:
    if abs(a) < x:
        x = abs(a)
        y = a
print((sum(A) - y))

N, L = list(map(int, input().split()))
R = L + N - 1
if L <= 0 <= R:
    print((sum(range(L, R + 1))))
elif L > 0:
    print((sum(range(L + 1, R + 1))))
else:
    print((sum(range(L, R))))

-A = [L + i for i in range(N)] -x = 10**9 -y = -1 -for a in A: -    if abs(a) < x: -        x = abs(a) -        y = a -print((sum(A) - y)) +R = L + N - 1 +if L <= 0 <= R: +    print((sum(range(L, R + 1)))) +elif L > 0: +    print((sum(range(L + 1, R + 1)))) +else: +    print((sum(range(L, R))))