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

a = L - 1

b = [a + i for i in range(1, N+1)]

s = sum(b)



if 0 in b:

    print(s)

elif s > 0:

    print((s - min(b)))

else:

    print((s - max(b)))
N, L = list(map(int,input().split()))

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

s = sum(b)



if 0 in b:

    print(s)

elif s > 0:

    print((s - min(b)))

else:

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

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

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