n,l=(list(map(int,input().split())))

if l>0:

  print((int((n*l+(n+1)*n/2-n-l))))

elif l+n-1<0:

  print((int((n*l+(n+1)*n/2-n-(l+n-1)))))

else:

  print((int((n*l+(n+1)*n/2-n))))
n,l=(list(map(int,input().split())))

if l>0:

  print((sum(range(l+1,l+n))))

elif l+n-1<0:

  print((sum(range(l,l+n-1))))

else:

  print((sum(range(l,l+n))))
n, l = list(map(int, input().split()))
if l > 0:
    print((int((n * l + (n + 1) * n / 2 - n - l))))
elif l + n - 1 < 0:
    print((int((n * l + (n + 1) * n / 2 - n - (l + n - 1)))))
else:
    print((int((n * l + (n + 1) * n / 2 - n))))

n, l = list(map(int, input().split()))
if l > 0:
    print((sum(range(l + 1, l + n))))
elif l + n - 1 < 0:
    print((sum(range(l, l + n - 1))))
else:
    print((sum(range(l, l + n))))

-    print((int((n * l + (n + 1) * n / 2 - n - l)))) +    print((sum(range(l + 1, l + n)))) -    print((int((n * l + (n + 1) * n / 2 - n - (l + n - 1))))) +    print((sum(range(l, l + n - 1)))) -    print((int((n * l + (n + 1) * n / 2 - n)))) +    print((sum(range(l, l + n))))