N,L = [int(i) for i in input().split()]



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



tmp = 1000

ind = 0

for i in range(N):

    if tmp > abs(A[i]):

        tmp = abs(A[i])

        ind = i

print((sum(A)-A[ind]))

N,L = [int(i) for i in input().split()]



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

B = [abs(i+L-1) for i in range(1,N+1)]



print((sum(A)-A[B.index(min(B))]))

N, L = [int(i) for i in input().split()]
A = [L + i for i in range(N)]
tmp = 1000
ind = 0
for i in range(N):
    if tmp > abs(A[i]):
        tmp = abs(A[i])
        ind = i
print((sum(A) - A[ind]))

N, L = [int(i) for i in input().split()]
A = [i + L - 1 for i in range(1, N + 1)]
B = [abs(i + L - 1) for i in range(1, N + 1)]
print((sum(A) - A[B.index(min(B))]))

-A = [L + i for i in range(N)] -tmp = 1000 -ind = 0 -for i in range(N): -    if tmp > abs(A[i]): -        tmp = abs(A[i]) -        ind = i -print((sum(A) - A[ind])) +A = [i + L - 1 for i in range(1, N + 1)] +B = [abs(i + L - 1) for i in range(1, N + 1)] +print((sum(A) - A[B.index(min(B))]))