N,L = map(int,input().split())
s = sum([L+i-1 for i in range(1,N+1)])
if L <= 0 and L+N-1 >= 0:
    print(s)
elif L > 0:
    print(s-L)
else:
    print(s-L-N+1)
ae5c19a493c071604ae7c2d770ca5f485d8cc4b5
<mask token>

<mask token>
if L <= 0 and L + N - 1 >= 0:
    print(s)
elif L > 0:
    print(s - L)
else:
    print(s - L - N + 1)

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

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