import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int l = in.nextInt();
		System.out.println(solve(n, l));
		in.close();
	}

	private static int solve(int n, int l) {
		int r = 0;
		int e = 99999;
		for (int i = 1; i <= n; i++) {
			int a = l + i - 1;
			r += a;
			if (Math.abs(e) > Math.abs(a))
				e = a;
		}
		return r - e;
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Arrays; Arrays java.util import java.util.Comparator; Comparator java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int l = in.nextInt();
		System.out.println(solve(n, l));
		in.close();
	}

	private static int solve(int n, int l) {
		int r = 0;
		int e = 99999;
		for (int i = 1; i <= n; i++) {
			int a = l + i - 1;
			r += a;
			if (Math.abs(e) > Math.abs(a))
				e = a;
		}
		return r - e;
	}

} Main public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int l = in.nextInt();
		System.out.println(solve(n, l));
		in.close();
	} main {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int l = in.nextInt();
		System.out.println(solve(n, l));
		in.close();
	} Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); in new Scanner(new BufferedReader(new InputStreamReader(System.in))) int n = in.nextInt(); n in.nextInt() in.nextInt in int l = in.nextInt(); l in.nextInt() in.nextInt in System.out.println(solve(n, l)) System.out.println System.out System System.out solve(n, l) solve n l in.close() in.close in String[] args args private static int solve(int n, int l) {
		int r = 0;
		int e = 99999;
		for (int i = 1; i <= n; i++) {
			int a = l + i - 1;
			r += a;
			if (Math.abs(e) > Math.abs(a))
				e = a;
		}
		return r - e;
	} solve {
		int r = 0;
		int e = 99999;
		for (int i = 1; i <= n; i++) {
			int a = l + i - 1;
			r += a;
			if (Math.abs(e) > Math.abs(a))
				e = a;
		}
		return r - e;
	} int r = 0; r 0 int e = 99999; e 99999 for (int i = 1; i <= n; i++) {
			int a = l + i - 1;
			r += a;
			if (Math.abs(e) > Math.abs(a))
				e = a;
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			int a = l + i - 1;
			r += a;
			if (Math.abs(e) > Math.abs(a))
				e = a;
		} {
			int a = l + i - 1;
			r += a;
			if (Math.abs(e) > Math.abs(a))
				e = a;
		} int a = l + i - 1; a l + i - 1 l + i l i 1 r += a r a if (Math.abs(e) > Math.abs(a))
				e = a; Math.abs(e) > Math.abs(a) Math.abs(e) Math.abs Math e Math.abs(a) Math.abs Math a e = a e a return r - e; r - e r e int n n int l l public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int l = in.nextInt();
		System.out.println(solve(n, l));
		in.close();
	}

	private static int solve(int n, int l) {
		int r = 0;
		int e = 99999;
		for (int i = 1; i <= n; i++) {
			int a = l + i - 1;
			r += a;
			if (Math.abs(e) > Math.abs(a))
				e = a;
		}
		return r - e;
	}

} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int l = in.nextInt();
		System.out.println(solve(n, l));
		in.close();
	}

	private static int solve(int n, int l) {
		int r = 0;
		int e = 99999;
		for (int i = 1; i <= n; i++) {
			int a = l + i - 1;
			r += a;
			if (Math.abs(e) > Math.abs(a))
				e = a;
		}
		return r - e;
	}

} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
		int n = in.nextInt();
		int l = in.nextInt();
		System.out.println(solve(n, l));
		in.close();
	}

	private static int solve(int n, int l) {
		int r = 0;
		int e = 99999;
		for (int i = 1; i <= n; i++) {
			int a = l + i - 1;
			r += a;
			if (Math.abs(e) > Math.abs(a))
				e = a;
		}
		return r - e;
	}

}
