import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] tastes = new int[N];
        int min = Integer.MAX_VALUE;
        int total = 0;
        int index = 0;
        for (int i = 0; i < N; i++) {
            int taste = L+i;
            total += taste;
            tastes[i] = taste;
            int moo = Math.min(min, Math.abs(taste));
            if (moo < min) {
                min = moo;
                index = i;
            }
        }
        System.out.println(total-tastes[index]);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] tastes = new int[N];
        int min = Integer.MAX_VALUE;
        int total = 0;
        int index = 0;
        for (int i = 0; i < N; i++) {
            int taste = L+i;
            total += taste;
            tastes[i] = taste;
            int moo = Math.min(min, Math.abs(taste));
            if (moo < min) {
                min = moo;
                index = i;
            }
        }
        System.out.println(total-tastes[index]);
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] tastes = new int[N];
        int min = Integer.MAX_VALUE;
        int total = 0;
        int index = 0;
        for (int i = 0; i < N; i++) {
            int taste = L+i;
            total += taste;
            tastes[i] = taste;
            int moo = Math.min(min, Math.abs(taste));
            if (moo < min) {
                min = moo;
                index = i;
            }
        }
        System.out.println(total-tastes[index]);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] tastes = new int[N];
        int min = Integer.MAX_VALUE;
        int total = 0;
        int index = 0;
        for (int i = 0; i < N; i++) {
            int taste = L+i;
            total += taste;
            tastes[i] = taste;
            int moo = Math.min(min, Math.abs(taste));
            if (moo < min) {
                min = moo;
                index = i;
            }
        }
        System.out.println(total-tastes[index]);
    } 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[] tastes = new int[N]; tastes new int[N] N int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int total = 0; total 0 int index = 0; index 0 for (int i = 0; i < N; i++) {
            int taste = L+i;
            total += taste;
            tastes[i] = taste;
            int moo = Math.min(min, Math.abs(taste));
            if (moo < min) {
                min = moo;
                index = i;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int taste = L+i;
            total += taste;
            tastes[i] = taste;
            int moo = Math.min(min, Math.abs(taste));
            if (moo < min) {
                min = moo;
                index = i;
            }
        } {
            int taste = L+i;
            total += taste;
            tastes[i] = taste;
            int moo = Math.min(min, Math.abs(taste));
            if (moo < min) {
                min = moo;
                index = i;
            }
        } int taste = L+i; taste L+i L i total += taste total taste tastes[i] = taste tastes[i] tastes i taste int moo = Math.min(min, Math.abs(taste)); moo Math.min(min, Math.abs(taste)) Math.min Math min Math.abs(taste) Math.abs Math taste if (moo < min) {
                min = moo;
                index = i;
            } moo < min moo min {
                min = moo;
                index = i;
            } min = moo min moo index = i index i System.out.println(total-tastes[index]) System.out.println System.out System System.out total-tastes[index] total tastes[index] tastes index String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] tastes = new int[N];
        int min = Integer.MAX_VALUE;
        int total = 0;
        int index = 0;
        for (int i = 0; i < N; i++) {
            int taste = L+i;
            total += taste;
            tastes[i] = taste;
            int moo = Math.min(min, Math.abs(taste));
            if (moo < min) {
                min = moo;
                index = i;
            }
        }
        System.out.println(total-tastes[index]);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] tastes = new int[N];
        int min = Integer.MAX_VALUE;
        int total = 0;
        int index = 0;
        for (int i = 0; i < N; i++) {
            int taste = L+i;
            total += taste;
            tastes[i] = taste;
            int moo = Math.min(min, Math.abs(taste));
            if (moo < min) {
                min = moo;
                index = i;
            }
        }
        System.out.println(total-tastes[index]);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        int[] tastes = new int[N];
        int min = Integer.MAX_VALUE;
        int total = 0;
        int index = 0;
        for (int i = 0; i < N; i++) {
            int taste = L+i;
            total += taste;
            tastes[i] = taste;
            int moo = Math.min(min, Math.abs(taste));
            if (moo < min) {
                min = moo;
                index = i;
            }
        }
        System.out.println(total-tastes[index]);
    }
}