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

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

if taste[-1] < 0:

  print((sum(taste) + min([abs(x) for x in taste])))

else:

  print((sum(taste) - min([abs(x) for x in taste])))
N, L = list(map(int, input().split()))



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



if 0 in taste:

    select = 0

else:

    select_with_ind = min(enumerate(taste), key = lambda x: abs(x[1]))

    select = select_with_ind[1]

    

print((sum(taste) - select))
N, L = list(map(int, input().split()))
taste = [L + i - 1 for i in range(1, N + 1)]
if taste[-1] < 0:
    print((sum(taste) + min([abs(x) for x in taste])))
else:
    print((sum(taste) - min([abs(x) for x in taste])))

N, L = list(map(int, input().split()))
taste = [L + i - 1 for i in range(1, N + 1)]
if 0 in taste:
    select = 0
else:
    select_with_ind = min(enumerate(taste), key=lambda x: abs(x[1]))
    select = select_with_ind[1]
print((sum(taste) - select))

-if taste[-1] < 0: -    print((sum(taste) + min([abs(x) for x in taste]))) +if 0 in taste: +    select = 0 -    print((sum(taste) - min([abs(x) for x in taste]))) +    select_with_ind = min(enumerate(taste), key=lambda x: abs(x[1])) +    select = select_with_ind[1] +print((sum(taste) - select))