n,l = list(map(int,input().split()))

taste = [l+i-1 for i in range(1,n+1)]

ideal = sum(taste)

bited = [ideal-taste[i] for i in range(n)]

dif = [abs(ideal-bited[i]) for i in range(n)]

print((bited[dif.index(min(dif))])) 

n,l=(list(map(int,input().split())))

if l>0:

  print((sum(range(l+1,l+n))))

elif l+n-1<0:

  print((sum(range(l,l+n-1))))

else:

  print((sum(range(l,l+n))))

n, l = list(map(int, input().split()))
taste = [l + i - 1 for i in range(1, n + 1)]
ideal = sum(taste)
bited = [ideal - taste[i] for i in range(n)]
dif = [abs(ideal - bited[i]) for i in range(n)]
print((bited[dif.index(min(dif))]))

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

-taste = [l + i - 1 for i in range(1, n + 1)] -ideal = sum(taste) -bited = [ideal - taste[i] for i in range(n)] -dif = [abs(ideal - bited[i]) for i in range(n)] -print((bited[dif.index(min(dif))])) +if l > 0: +    print((sum(range(l + 1, l + n)))) +elif l + n - 1 < 0: +    print((sum(range(l, l + n - 1)))) +else: +    print((sum(range(l, l + n))))