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

diff_min = 100 + 200 - 1

apples = list()

remove_apple = 0



for i in range(N):

    taste = L + i

    apples.append(taste)

    if abs(taste) < diff_min:

        diff_min = abs(taste)

        remove_apple = taste



print((sum(apples) - remove_apple))

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

diff = 300

ans = [0] * n

p = 0

for i in range(n):

    taste = l + i

    ans[i] = taste

    if diff > abs(taste):

        diff = abs(taste)

        p = i

print((sum(ans) - ans[p]))
N, L = list(map(int, input().split()))
diff_min = 100 + 200 - 1
apples = list()
remove_apple = 0
for i in range(N):
    taste = L + i
    apples.append(taste)
    if abs(taste) < diff_min:
        diff_min = abs(taste)
        remove_apple = taste
print((sum(apples) - remove_apple))

n, l = list(map(int, input().split()))
diff = 300
ans = [0] * n
p = 0
for i in range(n):
    taste = l + i
    ans[i] = taste
    if diff > abs(taste):
        diff = abs(taste)
        p = i
print((sum(ans) - ans[p]))

-N, L = list(map(int, input().split())) -diff_min = 100 + 200 - 1 -apples = list() -remove_apple = 0 -for i in range(N): -    taste = L + i -    apples.append(taste) -    if abs(taste) < diff_min: -        diff_min = abs(taste) -        remove_apple = taste -print((sum(apples) - remove_apple)) +n, l = list(map(int, input().split())) +diff = 300 +ans = [0] * n +p = 0 +for i in range(n): +    taste = l + i +    ans[i] = taste +    if diff > abs(taste): +        diff = abs(taste) +        p = i +print((sum(ans) - ans[p]))