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 gouke = 0;
		int abs = Integer.MAX_VALUE;
		int absNum = 0;
		for (int i = 0; i < N; i++) {
			gouke += L + i;
			if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			}
		}
		System.out.println(gouke - absNum);
	}
} 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 gouke = 0;
		int abs = Integer.MAX_VALUE;
		int absNum = 0;
		for (int i = 0; i < N; i++) {
			gouke += L + i;
			if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			}
		}
		System.out.println(gouke - absNum);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

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

		int gouke = 0;
		int abs = Integer.MAX_VALUE;
		int absNum = 0;
		for (int i = 0; i < N; i++) {
			gouke += L + i;
			if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			}
		}
		System.out.println(gouke - absNum);
	} main {
		Scanner sc = new Scanner(System.in);

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

		int gouke = 0;
		int abs = Integer.MAX_VALUE;
		int absNum = 0;
		for (int i = 0; i < N; i++) {
			gouke += L + i;
			if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			}
		}
		System.out.println(gouke - absNum);
	} 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 gouke = 0; gouke 0 int abs = Integer.MAX_VALUE; abs Integer.MAX_VALUE Integer Integer.MAX_VALUE int absNum = 0; absNum 0 for (int i = 0; i < N; i++) {
			gouke += L + i;
			if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			gouke += L + i;
			if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			}
		} {
			gouke += L + i;
			if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			}
		} gouke += L + i gouke L + i L i if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			} abs > Math.abs(L + i) abs Math.abs(L + i) Math.abs Math L + i L i {
				abs = Math.abs(L + i);
				absNum = L + i;
			} abs = Math.abs(L + i) abs Math.abs(L + i) Math.abs Math L + i L i absNum = L + i absNum L + i L i System.out.println(gouke - absNum) System.out.println System.out System System.out gouke - absNum gouke absNum 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 gouke = 0;
		int abs = Integer.MAX_VALUE;
		int absNum = 0;
		for (int i = 0; i < N; i++) {
			gouke += L + i;
			if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			}
		}
		System.out.println(gouke - absNum);
	}
} public class Main {

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

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

		int gouke = 0;
		int abs = Integer.MAX_VALUE;
		int absNum = 0;
		for (int i = 0; i < N; i++) {
			gouke += L + i;
			if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			}
		}
		System.out.println(gouke - absNum);
	}
} 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 gouke = 0;
		int abs = Integer.MAX_VALUE;
		int absNum = 0;
		for (int i = 0; i < N; i++) {
			gouke += L + i;
			if (abs > Math.abs(L + i)) {
				abs = Math.abs(L + i);
				absNum = L + i;
			}
		}
		System.out.println(gouke - absNum);
	}
}
