N, L = [int(i) for i in input().split(' ')]



min_ = L

max_ = L + N -1



def eat_apple(N, L):

    if L < 0:

        if max_<0:

            return max_ 

        return 0

    return L



print((int((min_+max_)*(max_-min_+1)/2 - eat_apple(N, L))))
N, L = [int(i) for i in input().split()]



min_ = L

max_ = L + N -1



def eat_apple(N, L):

    if max_<0:

        return max_ 

    if L < 0:

        return 0

    return L



print(((min_+max_)*(max_-min_+1)//2 - eat_apple(N, L)))
N, L = [int(i) for i in input().split(" ")]
min_ = L
max_ = L + N - 1


def eat_apple(N, L):
    if L < 0:
        if max_ < 0:
            return max_
        return 0
    return L


print((int((min_ + max_) * (max_ - min_ + 1) / 2 - eat_apple(N, L))))

N, L = [int(i) for i in input().split()]
min_ = L
max_ = L + N - 1


def eat_apple(N, L):
    if max_ < 0:
        return max_
    if L < 0:
        return 0
    return L


print(((min_ + max_) * (max_ - min_ + 1) // 2 - eat_apple(N, L)))

-N, L = [int(i) for i in input().split(" ")] +N, L = [int(i) for i in input().split()] +    if max_ < 0: +        return max_ -        if max_ < 0: -            return max_ -print((int((min_ + max_) * (max_ - min_ + 1) / 2 - eat_apple(N, L)))) +print(((min_ + max_) * (max_ - min_ + 1) // 2 - eat_apple(N, L)))