import 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();

        int motoAji = 0;
        int min = l;
        int minAbs = Math.abs(l);
        for (int i = 1; i < n; i++) {
            int current = l + i;
            int currentAbs = Math.abs(current);
            if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            }
        }
        for (int i = 0; i < n; i++) {
            motoAji += (l + i);
        }
        System.out.println(motoAji - min);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();

        int motoAji = 0;
        int min = l;
        int minAbs = Math.abs(l);
        for (int i = 1; i < n; i++) {
            int current = l + i;
            int currentAbs = Math.abs(current);
            if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            }
        }
        for (int i = 0; i < n; i++) {
            motoAji += (l + i);
        }
        System.out.println(motoAji - min);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();

        int motoAji = 0;
        int min = l;
        int minAbs = Math.abs(l);
        for (int i = 1; i < n; i++) {
            int current = l + i;
            int currentAbs = Math.abs(current);
            if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            }
        }
        for (int i = 0; i < n; i++) {
            motoAji += (l + i);
        }
        System.out.println(motoAji - min);
    } main {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();

        int motoAji = 0;
        int min = l;
        int minAbs = Math.abs(l);
        for (int i = 1; i < n; i++) {
            int current = l + i;
            int currentAbs = Math.abs(current);
            if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            }
        }
        for (int i = 0; i < n; i++) {
            motoAji += (l + i);
        }
        System.out.println(motoAji - min);
    } 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 int motoAji = 0; motoAji 0 int min = l; min l int minAbs = Math.abs(l); minAbs Math.abs(l) Math.abs Math l for (int i = 1; i < n; i++) {
            int current = l + i;
            int currentAbs = Math.abs(current);
            if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            }
        } int i = 1; int i = 1; i 1 i < n i n i++ i++ i {
            int current = l + i;
            int currentAbs = Math.abs(current);
            if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            }
        } {
            int current = l + i;
            int currentAbs = Math.abs(current);
            if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            }
        } int current = l + i; current l + i l i int currentAbs = Math.abs(current); currentAbs Math.abs(current) Math.abs Math current if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            } minAbs > currentAbs minAbs currentAbs {
                minAbs = currentAbs;
                min = current;
            } minAbs = currentAbs minAbs currentAbs min = current min current for (int i = 0; i < n; i++) {
            motoAji += (l + i);
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            motoAji += (l + i);
        } {
            motoAji += (l + i);
        } motoAji += (l + i) motoAji (l + i) l i System.out.println(motoAji - min) System.out.println System.out System System.out motoAji - min motoAji min 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();

        int motoAji = 0;
        int min = l;
        int minAbs = Math.abs(l);
        for (int i = 1; i < n; i++) {
            int current = l + i;
            int currentAbs = Math.abs(current);
            if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            }
        }
        for (int i = 0; i < n; i++) {
            motoAji += (l + i);
        }
        System.out.println(motoAji - min);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int n = sc.nextInt();
        int l = sc.nextInt();

        int motoAji = 0;
        int min = l;
        int minAbs = Math.abs(l);
        for (int i = 1; i < n; i++) {
            int current = l + i;
            int currentAbs = Math.abs(current);
            if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            }
        }
        for (int i = 0; i < n; i++) {
            motoAji += (l + i);
        }
        System.out.println(motoAji - min);
    }
} Main
import 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();

        int motoAji = 0;
        int min = l;
        int minAbs = Math.abs(l);
        for (int i = 1; i < n; i++) {
            int current = l + i;
            int currentAbs = Math.abs(current);
            if (minAbs > currentAbs) {
                minAbs = currentAbs;
                min = current;
            }
        }
        for (int i = 0; i < n; i++) {
            motoAji += (l + i);
        }
        System.out.println(motoAji - min);
    }
}
