#ABCB - Bite Eating

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

all = 0

apple = []

for i in range(N):

    apple.append(L + i)

a = min(apple)

b = max(apple)

if 0 in apple:

    print((sum(apple)))

elif b < 0:

    print((sum(apple)-b))

elif a > 0:

    print((sum(apple)-a))
#ABC131B - Bite Eating

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

a = L

b = L + N-1

taste = 0

for i in range(N):

    taste += L + i

if b < 0:

    print((taste - b))

elif a <= 0 and b >= 0:

    print((taste - 0))

elif a > 0:

    print((taste-a))
# ABCB - Bite Eating
N, L = list(map(int, input().split()))
all = 0
apple = []
for i in range(N):
    apple.append(L + i)
a = min(apple)
b = max(apple)
if 0 in apple:
    print((sum(apple)))
elif b < 0:
    print((sum(apple) - b))
elif a > 0:
    print((sum(apple) - a))

# ABC131B - Bite Eating
N, L = list(map(int, input().split()))
a = L
b = L + N - 1
taste = 0
for i in range(N):
    taste += L + i
if b < 0:
    print((taste - b))
elif a <= 0 and b >= 0:
    print((taste - 0))
elif a > 0:
    print((taste - a))

-# ABCB - Bite Eating +# ABC131B - Bite Eating -all = 0 -apple = [] +a = L +b = L + N - 1 +taste = 0 -    apple.append(L + i) -a = min(apple) -b = max(apple) -if 0 in apple: -    print((sum(apple))) -elif b < 0: -    print((sum(apple) - b)) +    taste += L + i +if b < 0: +    print((taste - b)) +elif a <= 0 and b >= 0: +    print((taste - 0)) -    print((sum(apple) - a)) +    print((taste - a))