import java.util.Scanner;

public class Main {

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

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

		int ajiMin = 9999;
		int ajiSum = 0;
		for (int i = 1; i <= N; i++) {
			int aji = L + i - 1;
			ajiSum += aji;

			if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			}
		}
		System.out.println(ajiSum - ajiMin);

	}

} import java.util.Scanner; Scanner java.util public class Main {

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

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

		int ajiMin = 9999;
		int ajiSum = 0;
		for (int i = 1; i <= N; i++) {
			int aji = L + i - 1;
			ajiSum += aji;

			if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			}
		}
		System.out.println(ajiSum - ajiMin);

	}

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

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

		int ajiMin = 9999;
		int ajiSum = 0;
		for (int i = 1; i <= N; i++) {
			int aji = L + i - 1;
			ajiSum += aji;

			if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			}
		}
		System.out.println(ajiSum - ajiMin);

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

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

		int ajiMin = 9999;
		int ajiSum = 0;
		for (int i = 1; i <= N; i++) {
			int aji = L + i - 1;
			ajiSum += aji;

			if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			}
		}
		System.out.println(ajiSum - ajiMin);

	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int N = s.nextInt(); N s.nextInt() s.nextInt s int L = s.nextInt(); L s.nextInt() s.nextInt s int ajiMin = 9999; ajiMin 9999 int ajiSum = 0; ajiSum 0 for (int i = 1; i <= N; i++) {
			int aji = L + i - 1;
			ajiSum += aji;

			if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			}
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			int aji = L + i - 1;
			ajiSum += aji;

			if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			}
		} {
			int aji = L + i - 1;
			ajiSum += aji;

			if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			}
		} int aji = L + i - 1; aji L + i - 1 L + i L i 1 ajiSum += aji ajiSum aji if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			} Math.abs(aji) < Math.abs(ajiMin) Math.abs(aji) Math.abs Math aji Math.abs(ajiMin) Math.abs Math ajiMin {
				ajiMin = aji;
			} ajiMin = aji ajiMin aji System.out.println(ajiSum - ajiMin) System.out.println System.out System System.out ajiSum - ajiMin ajiSum ajiMin String[] args args public class Main {

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

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

		int ajiMin = 9999;
		int ajiSum = 0;
		for (int i = 1; i <= N; i++) {
			int aji = L + i - 1;
			ajiSum += aji;

			if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			}
		}
		System.out.println(ajiSum - ajiMin);

	}

} public class Main {

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

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

		int ajiMin = 9999;
		int ajiSum = 0;
		for (int i = 1; i <= N; i++) {
			int aji = L + i - 1;
			ajiSum += aji;

			if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			}
		}
		System.out.println(ajiSum - ajiMin);

	}

} Main
import java.util.Scanner;

public class Main {

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

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

		int ajiMin = 9999;
		int ajiSum = 0;
		for (int i = 1; i <= N; i++) {
			int aji = L + i - 1;
			ajiSum += aji;

			if(Math.abs(aji) < Math.abs(ajiMin)) {
				ajiMin = aji;
			}
		}
		System.out.println(ajiSum - ajiMin);

	}

}
