inf = float('inf')



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



s = 0

eat = inf



for i in range(L, L + N):

    if abs(i) < abs(eat):

        eat = i

    s += i



print((s - eat))

def main():

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



    e = sorted((x + L for x in range(N)), key=lambda x: abs(x))

    ans = N * L + (N - 1) * N // 2 - e[0]

    print(ans)





if __name__ == '__main__':

    main()



# import sys

#

# sys.setrecursionlimit(10 ** 7)

#

# input = sys.stdin.readline

# rstrip()

# int(input())

# map(int, input().split())

inf = float("inf")
N, L = list(map(int, input().split()))
s = 0
eat = inf
for i in range(L, L + N):
    if abs(i) < abs(eat):
        eat = i
    s += i
print((s - eat))

def main():
    N, L = list(map(int, input().split()))
    e = sorted((x + L for x in range(N)), key=lambda x: abs(x))
    ans = N * L + (N - 1) * N // 2 - e[0]
    print(ans)


if __name__ == "__main__":
    main()
# import sys
#
# sys.setrecursionlimit(10 ** 7)
#
# input = sys.stdin.readline
# rstrip()
# int(input())
# map(int, input().split())

-inf = float("inf") -N, L = list(map(int, input().split())) -s = 0 -eat = inf -for i in range(L, L + N): -    if abs(i) < abs(eat): -        eat = i -    s += i -print((s - eat)) +def main(): +    N, L = list(map(int, input().split())) +    e = sorted((x + L for x in range(N)), key=lambda x: abs(x)) +    ans = N * L + (N - 1) * N // 2 - e[0] +    print(ans) + + +if __name__ == "__main__": +    main() +# import sys +# +# sys.setrecursionlimit(10 ** 7) +# +# input = sys.stdin.readline +# rstrip() +# int(input()) +# map(int, input().split())