

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 first = l;
		int last = l + n - 1;
		int sum = n * l + n * (n + 1) / 2 - n;
		int ans = sum;

		if (first > 0) {
			ans -= first;
		} else if (last < 0) {
			ans -= last;
		}

		System.out.println(ans);

	}

} 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 first = l;
		int last = l + n - 1;
		int sum = n * l + n * (n + 1) / 2 - n;
		int ans = sum;

		if (first > 0) {
			ans -= first;
		} else if (last < 0) {
			ans -= last;
		}

		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();
		int first = l;
		int last = l + n - 1;
		int sum = n * l + n * (n + 1) / 2 - n;
		int ans = sum;

		if (first > 0) {
			ans -= first;
		} else if (last < 0) {
			ans -= last;
		}

		System.out.println(ans);

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

		int n = sc.nextInt();
		int l = sc.nextInt();
		int first = l;
		int last = l + n - 1;
		int sum = n * l + n * (n + 1) / 2 - n;
		int ans = sum;

		if (first > 0) {
			ans -= first;
		} else if (last < 0) {
			ans -= last;
		}

		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 int first = l; first l int last = l + n - 1; last l + n - 1 l + n l n 1 int sum = n * l + n * (n + 1) / 2 - n; sum n * l + n * (n + 1) / 2 - n n * l + n * (n + 1) / 2 n * l n l n * (n + 1) / 2 n * (n + 1) n (n + 1) n 1 2 n int ans = sum; ans sum if (first > 0) {
			ans -= first;
		} else if (last < 0) {
			ans -= last;
		} first > 0 first 0 {
			ans -= first;
		} ans -= first ans first if (last < 0) {
			ans -= last;
		} last < 0 last 0 {
			ans -= last;
		} ans -= last ans last 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();
		int first = l;
		int last = l + n - 1;
		int sum = n * l + n * (n + 1) / 2 - n;
		int ans = sum;

		if (first > 0) {
			ans -= first;
		} else if (last < 0) {
			ans -= last;
		}

		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();
		int first = l;
		int last = l + n - 1;
		int sum = n * l + n * (n + 1) / 2 - n;
		int ans = sum;

		if (first > 0) {
			ans -= first;
		} else if (last < 0) {
			ans -= last;
		}

		System.out.println(ans);

	}

} 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 first = l;
		int last = l + n - 1;
		int sum = n * l + n * (n + 1) / 2 - n;
		int ans = sum;

		if (first > 0) {
			ans -= first;
		} else if (last < 0) {
			ans -= last;
		}

		System.out.println(ans);

	}

}
