import numpy as np

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

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

if taste[-1] < 0:

  print((sum(taste) + min(np.abs(taste))))

else:

  print((sum(taste) - min(np.abs(taste))))
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])))
import numpy as np

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

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])))

-import numpy as np - -taste = np.array([L + i - 1 for i in range(1, N + 1)]) +taste = [L + i - 1 for i in range(1, N + 1)] -    print((sum(taste) + min(np.abs(taste)))) +    print((sum(taste) + min([abs(x) for x in taste]))) -    print((sum(taste) - min(np.abs(taste)))) +    print((sum(taste) - min([abs(x) for x in taste])))