import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());

        int temp = 10000;
        int temp2 = 10000;
        for (int i = 0; i < N; i++) {
            if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            }
        }
        System.out.println((int)(L * N + (N / 2) * (N - 1)) - temp2);
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());

        int temp = 10000;
        int temp2 = 10000;
        for (int i = 0; i < N; i++) {
            if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            }
        }
        System.out.println((int)(L * N + (N / 2) * (N - 1)) - temp2);
        sc.close();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());

        int temp = 10000;
        int temp2 = 10000;
        for (int i = 0; i < N; i++) {
            if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            }
        }
        System.out.println((int)(L * N + (N / 2) * (N - 1)) - temp2);
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        double N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());

        int temp = 10000;
        int temp2 = 10000;
        for (int i = 0; i < N; i++) {
            if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            }
        }
        System.out.println((int)(L * N + (N / 2) * (N - 1)) - temp2);
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) double N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int L = Integer.parseInt(sc.next()); L Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int temp = 10000; temp 10000 int temp2 = 10000; temp2 10000 for (int i = 0; i < N; i++) {
            if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            }
        } {
            if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            }
        } if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            } temp > Math.abs(L + i) temp Math.abs(L + i) Math.abs Math L + i L i {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            } temp = Math.abs(L + i) temp Math.abs(L + i) Math.abs Math L + i L i temp2 = (L + i) temp2 (L + i) L i System.out.println((int)(L * N + (N / 2) * (N - 1)) - temp2) System.out.println System.out System System.out (int)(L * N + (N / 2) * (N - 1)) - temp2 (int)(L * N + (N / 2) * (N - 1)) L * N L N (N / 2) * (N - 1) (N / 2) N 2 (N - 1) N 1 temp2 sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());

        int temp = 10000;
        int temp2 = 10000;
        for (int i = 0; i < N; i++) {
            if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            }
        }
        System.out.println((int)(L * N + (N / 2) * (N - 1)) - temp2);
        sc.close();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());

        int temp = 10000;
        int temp2 = 10000;
        for (int i = 0; i < N; i++) {
            if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            }
        }
        System.out.println((int)(L * N + (N / 2) * (N - 1)) - temp2);
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());

        int temp = 10000;
        int temp2 = 10000;
        for (int i = 0; i < N; i++) {
            if (temp > Math.abs(L + i)) {
                temp = Math.abs(L + i);
                temp2 = (L + i);
            }
        }
        System.out.println((int)(L * N + (N / 2) * (N - 1)) - temp2);
        sc.close();
    }
}
