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

a = []

b = []



#ringo goto aji dasu

for i in range(N):

  a.append(L+ i+1 -1)



if max(a) < 0:

  print((sum(a)-max(a)))

elif max(a) >= 0 and min(a) <= 0:

  print((sum(a)))

else:

  print((sum(a)-min(a)))
N, L = list(map(int, input().split()))

a = []

for i in range(N):

  a.append(L+i+1-1)

  

if min(a) > 0:

  print((sum(a)-min(a)))

  

elif min(a)<=0 and max(a)>=0:

  print((sum(a)))

  

else:

  print((sum(a)-max(a)))

  
N, L = list(map(int, input().split()))
a = []
b = []
# ringo goto aji dasu
for i in range(N):
    a.append(L + i + 1 - 1)
if max(a) < 0:
    print((sum(a) - max(a)))
elif max(a) >= 0 and min(a) <= 0:
    print((sum(a)))
else:
    print((sum(a) - min(a)))

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

-b = [] -# ringo goto aji dasu -if max(a) < 0: -    print((sum(a) - max(a))) -elif max(a) >= 0 and min(a) <= 0: +if min(a) > 0: +    print((sum(a) - min(a))) +elif min(a) <= 0 and max(a) >= 0: -    print((sum(a) - min(a))) +    print((sum(a) - max(a)))