import sys

import numpy as np



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



# 味

LL = np.arange(L,L+N)



m = abs(LL[0])



for i in range(N):

    if abs(m) > abs(LL[i]):

        m = LL[i]



print((np.sum(LL)-m))

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



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



if A[0] < 0:

    if A[-1] < 0:

        print((sum(A) - max(A)))

    else:

        print((sum(A)))

else:

    print((sum(A) - min(A)))

import sys
import numpy as np

N, L = list(map(int, input().split()))
# 味
LL = np.arange(L, L + N)
m = abs(LL[0])
for i in range(N):
    if abs(m) > abs(LL[i]):
        m = LL[i]
print((np.sum(LL) - m))

N, L = list(map(int, input().split()))
A = [i for i in range(L, L + N)]
if A[0] < 0:
    if A[-1] < 0:
        print((sum(A) - max(A)))
    else:
        print((sum(A)))
else:
    print((sum(A) - min(A)))

-import sys -import numpy as np - -# 味 -LL = np.arange(L, L + N) -m = abs(LL[0]) -for i in range(N): -    if abs(m) > abs(LL[i]): -        m = LL[i] -print((np.sum(LL) - m)) +A = [i for i in range(L, L + N)] +if A[0] < 0: +    if A[-1] < 0: +        print((sum(A) - max(A))) +    else: +        print((sum(A))) +else: +    print((sum(A) - min(A)))