import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        List<Integer> apples = new ArrayList<>();
        for(int i = 0;i < n;i++){
            apples.add(l + i);
        }
        int min = Integer.MAX_VALUE;
        for(int apple : apples){
            if(apple < 0){
                apple *= -1;
            }
            if(min > apple){
                min = apple;
            }
        }
        for(int i = 0;i < apples.size();i++) {
            int apple = apples.get(i);
            if (apple < 0) {
                apple *= -1;
            }
            if (apple == min) {
                apples.remove(i);
                break;
            }
        }
        int r = 0;
        for(int apple : apples){
            r += apple;
        }
        System.out.println(r);
    }
}
/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