import numpy as np



n,l = [int(x) for x in input().split()] 

x = np.arange(l,l+n)

y = np.abs(x)

x = np.delete(x, np.argmin(y))

print((np.sum(x)))
N, L = list(map(int, input().split()))

apples = [i for i in range(L, L+N)]

apples_abs = [abs(i) for i in apples]

min_idx = apples_abs.index(min(apples_abs))



print((sum(apples) - apples[min_idx]))
import numpy as np

n, l = [int(x) for x in input().split()]
x = np.arange(l, l + n)
y = np.abs(x)
x = np.delete(x, np.argmin(y))
print((np.sum(x)))

N, L = list(map(int, input().split()))
apples = [i for i in range(L, L + N)]
apples_abs = [abs(i) for i in apples]
min_idx = apples_abs.index(min(apples_abs))
print((sum(apples) - apples[min_idx]))

-import numpy as np - -n, l = [int(x) for x in input().split()] -x = np.arange(l, l + n) -y = np.abs(x) -x = np.delete(x, np.argmin(y)) -print((np.sum(x))) +N, L = list(map(int, input().split())) +apples = [i for i in range(L, L + N)] +apples_abs = [abs(i) for i in apples] +min_idx = apples_abs.index(min(apples_abs)) +print((sum(apples) - apples[min_idx]))