import java.util.Scanner;

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

		int n = sc.nextInt();
		int l = sc.nextInt();

		int sum = 0; // sum of taste

		// flag
		boolean positive = l >= 0;
		boolean t0 = false;

		for (int i = 1; i <= n; i++) {
			int t = l + i - 1; // taste
			if (positive) {
				if (i == 1) {
					continue;
				}
			} else {
				if (t == 0) {
					t0 = true;
					continue;
				}
				if (!t0 && i == n) {
					continue;
				}
			}
			sum += t;
		}

		System.out.println(sum);

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

		int n = sc.nextInt();
		int l = sc.nextInt();

		int sum = 0; // sum of taste

		// flag
		boolean positive = l >= 0;
		boolean t0 = false;

		for (int i = 1; i <= n; i++) {
			int t = l + i - 1; // taste
			if (positive) {
				if (i == 1) {
					continue;
				}
			} else {
				if (t == 0) {
					t0 = true;
					continue;
				}
				if (!t0 && i == n) {
					continue;
				}
			}
			sum += t;
		}

		System.out.println(sum);

		sc.close();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int l = sc.nextInt();

		int sum = 0; // sum of taste

		// flag
		boolean positive = l >= 0;
		boolean t0 = false;

		for (int i = 1; i <= n; i++) {
			int t = l + i - 1; // taste
			if (positive) {
				if (i == 1) {
					continue;
				}
			} else {
				if (t == 0) {
					t0 = true;
					continue;
				}
				if (!t0 && i == n) {
					continue;
				}
			}
			sum += t;
		}

		System.out.println(sum);

		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int l = sc.nextInt();

		int sum = 0; // sum of taste

		// flag
		boolean positive = l >= 0;
		boolean t0 = false;

		for (int i = 1; i <= n; i++) {
			int t = l + i - 1; // taste
			if (positive) {
				if (i == 1) {
					continue;
				}
			} else {
				if (t == 0) {
					t0 = true;
					continue;
				}
				if (!t0 && i == n) {
					continue;
				}
			}
			sum += t;
		}

		System.out.println(sum);

		sc.close();
	} 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 sum = 0; sum 0 boolean positive = l >= 0; positive l >= 0 l 0 boolean t0 = false; t0 false for (int i = 1; i <= n; i++) {
			int t = l + i - 1; // taste
			if (positive) {
				if (i == 1) {
					continue;
				}
			} else {
				if (t == 0) {
					t0 = true;
					continue;
				}
				if (!t0 && i == n) {
					continue;
				}
			}
			sum += t;
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			int t = l + i - 1; // taste
			if (positive) {
				if (i == 1) {
					continue;
				}
			} else {
				if (t == 0) {
					t0 = true;
					continue;
				}
				if (!t0 && i == n) {
					continue;
				}
			}
			sum += t;
		} {
			int t = l + i - 1; // taste
			if (positive) {
				if (i == 1) {
					continue;
				}
			} else {
				if (t == 0) {
					t0 = true;
					continue;
				}
				if (!t0 && i == n) {
					continue;
				}
			}
			sum += t;
		} int t = l + i - 1; t l + i - 1 l + i l i 1 if (positive) {
				if (i == 1) {
					continue;
				}
			} else {
				if (t == 0) {
					t0 = true;
					continue;
				}
				if (!t0 && i == n) {
					continue;
				}
			} positive {
				if (i == 1) {
					continue;
				}
			} if (i == 1) {
					continue;
				} i == 1 i 1 {
					continue;
				} continue; {
				if (t == 0) {
					t0 = true;
					continue;
				}
				if (!t0 && i == n) {
					continue;
				}
			} if (t == 0) {
					t0 = true;
					continue;
				} t == 0 t 0 {
					t0 = true;
					continue;
				} t0 = true t0 true continue; if (!t0 && i == n) {
					continue;
				} !t0 && i == n !t0 t0 i == n i n {
					continue;
				} continue; sum += t sum t System.out.println(sum) System.out.println System.out System System.out sum sc.close() sc.close sc String[] args args
import java.util.Scanner;

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

		int n = sc.nextInt();
		int l = sc.nextInt();

		int sum = 0; // sum of taste

		// flag
		boolean positive = l >= 0;
		boolean t0 = false;

		for (int i = 1; i <= n; i++) {
			int t = l + i - 1; // taste
			if (positive) {
				if (i == 1) {
					continue;
				}
			} else {
				if (t == 0) {
					t0 = true;
					continue;
				}
				if (!t0 && i == n) {
					continue;
				}
			}
			sum += t;
		}

		System.out.println(sum);

		sc.close();
	}
}
