import 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();
		sc.close();

		int[] tastes = new int[N];
		int minAbs = 1000;
		int minIdx = -1;

		// 味を求める
		for (int i = 0; i < N; i++) {
			tastes[i] = L + (i + 1) - 1;

			int abs = Math.abs(tastes[i]);
			if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			}
		}

		// アップルパイ
		int ans = 0;
		for (int i = 0; i < N; i++) {
			if (i != minIdx) {
				ans += tastes[i];
			}
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		sc.close();

		int[] tastes = new int[N];
		int minAbs = 1000;
		int minIdx = -1;

		// 味を求める
		for (int i = 0; i < N; i++) {
			tastes[i] = L + (i + 1) - 1;

			int abs = Math.abs(tastes[i]);
			if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			}
		}

		// アップルパイ
		int ans = 0;
		for (int i = 0; i < N; i++) {
			if (i != minIdx) {
				ans += tastes[i];
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		sc.close();

		int[] tastes = new int[N];
		int minAbs = 1000;
		int minIdx = -1;

		// 味を求める
		for (int i = 0; i < N; i++) {
			tastes[i] = L + (i + 1) - 1;

			int abs = Math.abs(tastes[i]);
			if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			}
		}

		// アップルパイ
		int ans = 0;
		for (int i = 0; i < N; i++) {
			if (i != minIdx) {
				ans += tastes[i];
			}
		}
		System.out.println(ans);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		sc.close();

		int[] tastes = new int[N];
		int minAbs = 1000;
		int minIdx = -1;

		// 味を求める
		for (int i = 0; i < N; i++) {
			tastes[i] = L + (i + 1) - 1;

			int abs = Math.abs(tastes[i]);
			if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			}
		}

		// アップルパイ
		int ans = 0;
		for (int i = 0; i < N; i++) {
			if (i != minIdx) {
				ans += tastes[i];
			}
		}
		System.out.println(ans);
	} 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 sc.close() sc.close sc int[] tastes = new int[N]; tastes new int[N] N int minAbs = 1000; minAbs 1000 int minIdx = -1; minIdx -1 1 for (int i = 0; i < N; i++) {
			tastes[i] = L + (i + 1) - 1;

			int abs = Math.abs(tastes[i]);
			if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			tastes[i] = L + (i + 1) - 1;

			int abs = Math.abs(tastes[i]);
			if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			}
		} {
			tastes[i] = L + (i + 1) - 1;

			int abs = Math.abs(tastes[i]);
			if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			}
		} tastes[i] = L + (i + 1) - 1 tastes[i] tastes i L + (i + 1) - 1 L + (i + 1) L (i + 1) i 1 1 int abs = Math.abs(tastes[i]); abs Math.abs(tastes[i]) Math.abs Math tastes[i] tastes i if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			} abs < minAbs abs minAbs {
				minAbs = abs;
				minIdx = i;
			} minAbs = abs minAbs abs minIdx = i minIdx i int ans = 0; ans 0 for (int i = 0; i < N; i++) {
			if (i != minIdx) {
				ans += tastes[i];
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			if (i != minIdx) {
				ans += tastes[i];
			}
		} {
			if (i != minIdx) {
				ans += tastes[i];
			}
		} if (i != minIdx) {
				ans += tastes[i];
			} i != minIdx i minIdx {
				ans += tastes[i];
			} ans += tastes[i] ans tastes[i] tastes i System.out.println(ans) System.out.println System.out System System.out ans 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();
		sc.close();

		int[] tastes = new int[N];
		int minAbs = 1000;
		int minIdx = -1;

		// 味を求める
		for (int i = 0; i < N; i++) {
			tastes[i] = L + (i + 1) - 1;

			int abs = Math.abs(tastes[i]);
			if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			}
		}

		// アップルパイ
		int ans = 0;
		for (int i = 0; i < N; i++) {
			if (i != minIdx) {
				ans += tastes[i];
			}
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		sc.close();

		int[] tastes = new int[N];
		int minAbs = 1000;
		int minIdx = -1;

		// 味を求める
		for (int i = 0; i < N; i++) {
			tastes[i] = L + (i + 1) - 1;

			int abs = Math.abs(tastes[i]);
			if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			}
		}

		// アップルパイ
		int ans = 0;
		for (int i = 0; i < N; i++) {
			if (i != minIdx) {
				ans += tastes[i];
			}
		}
		System.out.println(ans);
	}
} Main
import 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();
		sc.close();

		int[] tastes = new int[N];
		int minAbs = 1000;
		int minIdx = -1;

		// 味を求める
		for (int i = 0; i < N; i++) {
			tastes[i] = L + (i + 1) - 1;

			int abs = Math.abs(tastes[i]);
			if (abs < minAbs) {
				minAbs = abs;
				minIdx = i;
			}
		}

		// アップルパイ
		int ans = 0;
		for (int i = 0; i < N; i++) {
			if (i != minIdx) {
				ans += tastes[i];
			}
		}
		System.out.println(ans);
	}
}
