import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int l = in.nextInt();

        int total = 0;
        int min = 100000;
        int minV = 0;
        for (int i = l; i < n + l; i++) {
            total += i;
            if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            }
        }

        System.out.println(total - minV);

    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int l = in.nextInt();

        int total = 0;
        int min = 100000;
        int minV = 0;
        for (int i = l; i < n + l; i++) {
            total += i;
            if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            }
        }

        System.out.println(total - minV);

    }
} Main public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int l = in.nextInt();

        int total = 0;
        int min = 100000;
        int minV = 0;
        for (int i = l; i < n + l; i++) {
            total += i;
            if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            }
        }

        System.out.println(total - minV);

    } main {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int l = in.nextInt();

        int total = 0;
        int min = 100000;
        int minV = 0;
        for (int i = l; i < n + l; i++) {
            total += i;
            if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            }
        }

        System.out.println(total - minV);

    } Scanner in = new Scanner(System.in); in new Scanner(System.in) int n = in.nextInt(); n in.nextInt() in.nextInt in int l = in.nextInt(); l in.nextInt() in.nextInt in int total = 0; total 0 int min = 100000; min 100000 int minV = 0; minV 0 for (int i = l; i < n + l; i++) {
            total += i;
            if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            }
        } int i = l; int i = l; i l i < n + l i n + l n l i++ i++ i {
            total += i;
            if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            }
        } {
            total += i;
            if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            }
        } total += i total i if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            } Math.abs(i) < min Math.abs(i) Math.abs Math i min {
                min = Math.abs(i);
                minV = i;
            } min = Math.abs(i) min Math.abs(i) Math.abs Math i minV = i minV i System.out.println(total - minV) System.out.println System.out System System.out total - minV total minV String[] args args public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int l = in.nextInt();

        int total = 0;
        int min = 100000;
        int minV = 0;
        for (int i = l; i < n + l; i++) {
            total += i;
            if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            }
        }

        System.out.println(total - minV);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int l = in.nextInt();

        int total = 0;
        int min = 100000;
        int minV = 0;
        for (int i = l; i < n + l; i++) {
            total += i;
            if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            }
        }

        System.out.println(total - minV);

    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
        int l = in.nextInt();

        int total = 0;
        int min = 100000;
        int minV = 0;
        for (int i = l; i < n + l; i++) {
            total += i;
            if (Math.abs(i) < min) {
                min = Math.abs(i);
                minV = i;
            }
        }

        System.out.println(total - minV);

    }
}
