
import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();

		int a[] = new int[N];
		int sum = 0;

		for (int i = 0; i < N; i++) {
			a[i] = L + i;
			sum += a[i];
		}

		if (a[0] > 0) {
			System.out.print(sum - a[0]);
		} else if (a[N - 1] < 0) {
			System.out.print(sum - a[N - 1]);
		} else {
			System.out.print(sum);
		}

	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();

		int a[] = new int[N];
		int sum = 0;

		for (int i = 0; i < N; i++) {
			a[i] = L + i;
			sum += a[i];
		}

		if (a[0] > 0) {
			System.out.print(sum - a[0]);
		} else if (a[N - 1] < 0) {
			System.out.print(sum - a[N - 1]);
		} else {
			System.out.print(sum);
		}

	}
} Main public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();

		int a[] = new int[N];
		int sum = 0;

		for (int i = 0; i < N; i++) {
			a[i] = L + i;
			sum += a[i];
		}

		if (a[0] > 0) {
			System.out.print(sum - a[0]);
		} else if (a[N - 1] < 0) {
			System.out.print(sum - a[N - 1]);
		} else {
			System.out.print(sum);
		}

	} main {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();

		int a[] = new int[N];
		int sum = 0;

		for (int i = 0; i < N; i++) {
			a[i] = L + i;
			sum += a[i];
		}

		if (a[0] > 0) {
			System.out.print(sum - a[0]);
		} else if (a[N - 1] < 0) {
			System.out.print(sum - a[N - 1]);
		} else {
			System.out.print(sum);
		}

	} 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 a[] = new int[N]; a new int[N] N int sum = 0; sum 0 for (int i = 0; i < N; i++) {
			a[i] = L + i;
			sum += a[i];
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			a[i] = L + i;
			sum += a[i];
		} {
			a[i] = L + i;
			sum += a[i];
		} a[i] = L + i a[i] a i L + i L i sum += a[i] sum a[i] a i if (a[0] > 0) {
			System.out.print(sum - a[0]);
		} else if (a[N - 1] < 0) {
			System.out.print(sum - a[N - 1]);
		} else {
			System.out.print(sum);
		} a[0] > 0 a[0] a 0 0 {
			System.out.print(sum - a[0]);
		} System.out.print(sum - a[0]) System.out.print System.out System System.out sum - a[0] sum a[0] a 0 if (a[N - 1] < 0) {
			System.out.print(sum - a[N - 1]);
		} else {
			System.out.print(sum);
		} a[N - 1] < 0 a[N - 1] a N - 1 N 1 0 {
			System.out.print(sum - a[N - 1]);
		} System.out.print(sum - a[N - 1]) System.out.print System.out System System.out sum - a[N - 1] sum a[N - 1] a N - 1 N 1 {
			System.out.print(sum);
		} System.out.print(sum) System.out.print System.out System System.out sum String arg[] arg public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();

		int a[] = new int[N];
		int sum = 0;

		for (int i = 0; i < N; i++) {
			a[i] = L + i;
			sum += a[i];
		}

		if (a[0] > 0) {
			System.out.print(sum - a[0]);
		} else if (a[N - 1] < 0) {
			System.out.print(sum - a[N - 1]);
		} else {
			System.out.print(sum);
		}

	}
} public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();

		int a[] = new int[N];
		int sum = 0;

		for (int i = 0; i < N; i++) {
			a[i] = L + i;
			sum += a[i];
		}

		if (a[0] > 0) {
			System.out.print(sum - a[0]);
		} else if (a[N - 1] < 0) {
			System.out.print(sum - a[N - 1]);
		} else {
			System.out.print(sum);
		}

	}
} Main

import java.util.Scanner;

public class Main {
	public static void main(String arg[]) {

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();

		int a[] = new int[N];
		int sum = 0;

		for (int i = 0; i < N; i++) {
			a[i] = L + i;
			sum += a[i];
		}

		if (a[0] > 0) {
			System.out.print(sum - a[0]);
		} else if (a[N - 1] < 0) {
			System.out.print(sum - a[N - 1]);
		} else {
			System.out.print(sum);
		}

	}
}
