import java.util.*;
//import java.Math.*;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int aji[] = new int[N+1];
        int pi_aji = 0;
        int i;
        int min = 1000;
        int min_num = 1000;

        for (i = 1 ; i < N+1 ; i++) {
            aji[i] = L+i-1;
            if (Math.abs(min) > Math.abs(aji[i])) {
                min = aji[i];
                min_num = i;
            }
        }
        // System.out.println("min: "+ min);
        // System.out.println("min_num: "+ min_num);
        for (i = 1 ; i < N+1 ; i++) {
            if (i != min_num) {
                pi_aji += aji[i];
            }
        }
        System.out.println(pi_aji);
    }
}

/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz