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);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io import java.net.HttpURLConnection; HttpURLConnection java.net import java.net.URL; URL java.net import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util 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);
    }
} 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);
    } main {
        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);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc List<Integer> apples = new ArrayList<>(); apples new ArrayList<>() for(int i = 0;i < n;i++){
            apples.add(l + i);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            apples.add(l + i);
        } {
            apples.add(l + i);
        } apples.add(l + i) apples.add apples l + i l i int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int apple : apples){
            if(apple < 0){
                apple *= -1;
            }
            if(min > apple){
                min = apple;
            }
        } int apple apples {
            if(apple < 0){
                apple *= -1;
            }
            if(min > apple){
                min = apple;
            }
        } {
            if(apple < 0){
                apple *= -1;
            }
            if(min > apple){
                min = apple;
            }
        } if(apple < 0){
                apple *= -1;
            } apple < 0 apple 0 {
                apple *= -1;
            } apple *= -1 apple -1 1 if(min > apple){
                min = apple;
            } min > apple min apple {
                min = apple;
            } 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 i = 0; int i = 0; i 0 i < apples.size() i apples.size() apples.size apples i++ i++ i {
            int apple = apples.get(i);
            if (apple < 0) {
                apple *= -1;
            }
            if (apple == min) {
                apples.remove(i);
                break;
            }
        } {
            int apple = apples.get(i);
            if (apple < 0) {
                apple *= -1;
            }
            if (apple == min) {
                apples.remove(i);
                break;
            }
        } int apple = apples.get(i); apple apples.get(i) apples.get apples i if (apple < 0) {
                apple *= -1;
            } apple < 0 apple 0 {
                apple *= -1;
            } apple *= -1 apple -1 1 if (apple == min) {
                apples.remove(i);
                break;
            } apple == min apple min {
                apples.remove(i);
                break;
            } apples.remove(i) apples.remove apples i break; int r = 0; r 0 for(int apple : apples){
            r += apple;
        } int apple apples {
            r += apple;
        } {
            r += apple;
        } r += apple r apple System.out.println(r) System.out.println System.out System System.out r String[] args args 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);
    }
} 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);
    }
} Main
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);
    }
}