import java.util.ArrayList;
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> t = new ArrayList<>();
        for (int i = 1; i <= n; i++) {
            t.add(l + i - 1);
        }
        int absMinimum = Integer.MAX_VALUE;
        int minimum = Integer.MAX_VALUE;
        int sum = 0;
        for (Integer num : t) {
            sum += num;
            if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            }
        }
        System.out.println(sum - minimum);
    }
} import java.util.ArrayList; ArrayList 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> t = new ArrayList<>();
        for (int i = 1; i <= n; i++) {
            t.add(l + i - 1);
        }
        int absMinimum = Integer.MAX_VALUE;
        int minimum = Integer.MAX_VALUE;
        int sum = 0;
        for (Integer num : t) {
            sum += num;
            if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            }
        }
        System.out.println(sum - minimum);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        List<Integer> t = new ArrayList<>();
        for (int i = 1; i <= n; i++) {
            t.add(l + i - 1);
        }
        int absMinimum = Integer.MAX_VALUE;
        int minimum = Integer.MAX_VALUE;
        int sum = 0;
        for (Integer num : t) {
            sum += num;
            if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            }
        }
        System.out.println(sum - minimum);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        List<Integer> t = new ArrayList<>();
        for (int i = 1; i <= n; i++) {
            t.add(l + i - 1);
        }
        int absMinimum = Integer.MAX_VALUE;
        int minimum = Integer.MAX_VALUE;
        int sum = 0;
        for (Integer num : t) {
            sum += num;
            if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            }
        }
        System.out.println(sum - minimum);
    } 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> t = new ArrayList<>(); t new ArrayList<>() for (int i = 1; i <= n; i++) {
            t.add(l + i - 1);
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            t.add(l + i - 1);
        } {
            t.add(l + i - 1);
        } t.add(l + i - 1) t.add t l + i - 1 l + i l i 1 int absMinimum = Integer.MAX_VALUE; absMinimum Integer.MAX_VALUE Integer Integer.MAX_VALUE int minimum = Integer.MAX_VALUE; minimum Integer.MAX_VALUE Integer Integer.MAX_VALUE int sum = 0; sum 0 for (Integer num : t) {
            sum += num;
            if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            }
        } Integer num t {
            sum += num;
            if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            }
        } {
            sum += num;
            if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            }
        } sum += num sum num if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            } Math.abs(num) < absMinimum Math.abs(num) Math.abs Math num absMinimum {
                absMinimum = Math.abs(num);
                minimum = num;
            } absMinimum = Math.abs(num) absMinimum Math.abs(num) Math.abs Math num minimum = num minimum num System.out.println(sum - minimum) System.out.println System.out System System.out sum - minimum sum minimum 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> t = new ArrayList<>();
        for (int i = 1; i <= n; i++) {
            t.add(l + i - 1);
        }
        int absMinimum = Integer.MAX_VALUE;
        int minimum = Integer.MAX_VALUE;
        int sum = 0;
        for (Integer num : t) {
            sum += num;
            if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            }
        }
        System.out.println(sum - minimum);
    }
} 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> t = new ArrayList<>();
        for (int i = 1; i <= n; i++) {
            t.add(l + i - 1);
        }
        int absMinimum = Integer.MAX_VALUE;
        int minimum = Integer.MAX_VALUE;
        int sum = 0;
        for (Integer num : t) {
            sum += num;
            if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            }
        }
        System.out.println(sum - minimum);
    }
} Main
import java.util.ArrayList;
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> t = new ArrayList<>();
        for (int i = 1; i <= n; i++) {
            t.add(l + i - 1);
        }
        int absMinimum = Integer.MAX_VALUE;
        int minimum = Integer.MAX_VALUE;
        int sum = 0;
        for (Integer num : t) {
            sum += num;
            if (Math.abs(num) < absMinimum) {
                absMinimum = Math.abs(num);
                minimum = num;
            }
        }
        System.out.println(sum - minimum);
    }
}
