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



min_ = L

max_ = L + N -1



def eat_apple():

    if max_<0:

        return max_ 

    if L < 0:

        return 0

    return L



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



min_ = L

max_ = L + N -1



def eat_apple(N, L, max_):

    if max_<0:

        return max_ 

    if L < 0:

        return 0

    return L



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


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


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

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


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


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

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