import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int c = 0;
		int d = 1;
		int x = 0;
		boolean v = true;
		int e[] = new int[n];
		for (int i = 0; n > i; i++) {
			c = l + d -1;
			d = d+1;
			e[i] = c;
			x = x + c;
			if(c == 0) {
				v  = false;
			}
		}
		if(v == false) {
			System.out.println(x);
		}else {
			if(l >= 0) {
				System.out.println(x - e[0]);
			}else {
				System.out.println(x - e[n-1]);
			}
		}
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int c = 0;
		int d = 1;
		int x = 0;
		boolean v = true;
		int e[] = new int[n];
		for (int i = 0; n > i; i++) {
			c = l + d -1;
			d = d+1;
			e[i] = c;
			x = x + c;
			if(c == 0) {
				v  = false;
			}
		}
		if(v == false) {
			System.out.println(x);
		}else {
			if(l >= 0) {
				System.out.println(x - e[0]);
			}else {
				System.out.println(x - e[n-1]);
			}
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int c = 0;
		int d = 1;
		int x = 0;
		boolean v = true;
		int e[] = new int[n];
		for (int i = 0; n > i; i++) {
			c = l + d -1;
			d = d+1;
			e[i] = c;
			x = x + c;
			if(c == 0) {
				v  = false;
			}
		}
		if(v == false) {
			System.out.println(x);
		}else {
			if(l >= 0) {
				System.out.println(x - e[0]);
			}else {
				System.out.println(x - e[n-1]);
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int c = 0;
		int d = 1;
		int x = 0;
		boolean v = true;
		int e[] = new int[n];
		for (int i = 0; n > i; i++) {
			c = l + d -1;
			d = d+1;
			e[i] = c;
			x = x + c;
			if(c == 0) {
				v  = false;
			}
		}
		if(v == false) {
			System.out.println(x);
		}else {
			if(l >= 0) {
				System.out.println(x - e[0]);
			}else {
				System.out.println(x - e[n-1]);
			}
		}
	} 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 c = 0; c 0 int d = 1; d 1 int x = 0; x 0 boolean v = true; v true int e[] = new int[n]; e new int[n] n for (int i = 0; n > i; i++) {
			c = l + d -1;
			d = d+1;
			e[i] = c;
			x = x + c;
			if(c == 0) {
				v  = false;
			}
		} int i = 0; int i = 0; i 0 n > i n i i++ i++ i {
			c = l + d -1;
			d = d+1;
			e[i] = c;
			x = x + c;
			if(c == 0) {
				v  = false;
			}
		} {
			c = l + d -1;
			d = d+1;
			e[i] = c;
			x = x + c;
			if(c == 0) {
				v  = false;
			}
		} c = l + d -1 c l + d -1 l + d l d 1 d = d+1 d d+1 d 1 e[i] = c e[i] e i c x = x + c x x + c x c if(c == 0) {
				v  = false;
			} c == 0 c 0 {
				v  = false;
			} v  = false v false if(v == false) {
			System.out.println(x);
		}else {
			if(l >= 0) {
				System.out.println(x - e[0]);
			}else {
				System.out.println(x - e[n-1]);
			}
		} v == false v false {
			System.out.println(x);
		} System.out.println(x) System.out.println System.out System System.out x {
			if(l >= 0) {
				System.out.println(x - e[0]);
			}else {
				System.out.println(x - e[n-1]);
			}
		} if(l >= 0) {
				System.out.println(x - e[0]);
			}else {
				System.out.println(x - e[n-1]);
			} l >= 0 l 0 {
				System.out.println(x - e[0]);
			} System.out.println(x - e[0]) System.out.println System.out System System.out x - e[0] x e[0] e 0 {
				System.out.println(x - e[n-1]);
			} System.out.println(x - e[n-1]) System.out.println System.out System System.out x - e[n-1] x e[n-1] e n-1 n 1 String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int c = 0;
		int d = 1;
		int x = 0;
		boolean v = true;
		int e[] = new int[n];
		for (int i = 0; n > i; i++) {
			c = l + d -1;
			d = d+1;
			e[i] = c;
			x = x + c;
			if(c == 0) {
				v  = false;
			}
		}
		if(v == false) {
			System.out.println(x);
		}else {
			if(l >= 0) {
				System.out.println(x - e[0]);
			}else {
				System.out.println(x - e[n-1]);
			}
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int c = 0;
		int d = 1;
		int x = 0;
		boolean v = true;
		int e[] = new int[n];
		for (int i = 0; n > i; i++) {
			c = l + d -1;
			d = d+1;
			e[i] = c;
			x = x + c;
			if(c == 0) {
				v  = false;
			}
		}
		if(v == false) {
			System.out.println(x);
		}else {
			if(l >= 0) {
				System.out.println(x - e[0]);
			}else {
				System.out.println(x - e[n-1]);
			}
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int c = 0;
		int d = 1;
		int x = 0;
		boolean v = true;
		int e[] = new int[n];
		for (int i = 0; n > i; i++) {
			c = l + d -1;
			d = d+1;
			e[i] = c;
			x = x + c;
			if(c == 0) {
				v  = false;
			}
		}
		if(v == false) {
			System.out.println(x);
		}else {
			if(l >= 0) {
				System.out.println(x - e[0]);
			}else {
				System.out.println(x - e[n-1]);
			}
		}
	}
}