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();
		int end = l + n - 1;
		int sum;
		if (l >= 0) {
			sum = (l + 1 + end) * (n - 1) / 2;
		} else if (end > 0) {
			sum = (l + end) * n / 2;
		} else {
			sum = (l + end - 1) * (n - 1) / 2;
		}
		System.out.println(sum);
	}
} 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();
		int end = l + n - 1;
		int sum;
		if (l >= 0) {
			sum = (l + 1 + end) * (n - 1) / 2;
		} else if (end > 0) {
			sum = (l + end) * n / 2;
		} else {
			sum = (l + end - 1) * (n - 1) / 2;
		}
		System.out.println(sum);
	}
} Main public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int end = l + n - 1;
		int sum;
		if (l >= 0) {
			sum = (l + 1 + end) * (n - 1) / 2;
		} else if (end > 0) {
			sum = (l + end) * n / 2;
		} else {
			sum = (l + end - 1) * (n - 1) / 2;
		}
		System.out.println(sum);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int end = l + n - 1;
		int sum;
		if (l >= 0) {
			sum = (l + 1 + end) * (n - 1) / 2;
		} else if (end > 0) {
			sum = (l + end) * n / 2;
		} else {
			sum = (l + end - 1) * (n - 1) / 2;
		}
		System.out.println(sum);
	} 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 end = l + n - 1; end l + n - 1 l + n l n 1 int sum; sum if (l >= 0) {
			sum = (l + 1 + end) * (n - 1) / 2;
		} else if (end > 0) {
			sum = (l + end) * n / 2;
		} else {
			sum = (l + end - 1) * (n - 1) / 2;
		} l >= 0 l 0 {
			sum = (l + 1 + end) * (n - 1) / 2;
		} sum = (l + 1 + end) * (n - 1) / 2 sum (l + 1 + end) * (n - 1) / 2 (l + 1 + end) * (n - 1) (l + 1 + end) l + 1 + end l 1 end (n - 1) n 1 2 if (end > 0) {
			sum = (l + end) * n / 2;
		} else {
			sum = (l + end - 1) * (n - 1) / 2;
		} end > 0 end 0 {
			sum = (l + end) * n / 2;
		} sum = (l + end) * n / 2 sum (l + end) * n / 2 (l + end) * n (l + end) l end n 2 {
			sum = (l + end - 1) * (n - 1) / 2;
		} sum = (l + end - 1) * (n - 1) / 2 sum (l + end - 1) * (n - 1) / 2 (l + end - 1) * (n - 1) (l + end - 1) l + end l end 1 (n - 1) n 1 2 System.out.println(sum) System.out.println System.out System System.out sum 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 end = l + n - 1;
		int sum;
		if (l >= 0) {
			sum = (l + 1 + end) * (n - 1) / 2;
		} else if (end > 0) {
			sum = (l + end) * n / 2;
		} else {
			sum = (l + end - 1) * (n - 1) / 2;
		}
		System.out.println(sum);
	}
} public class Main {
	public static void main (String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int end = l + n - 1;
		int sum;
		if (l >= 0) {
			sum = (l + 1 + end) * (n - 1) / 2;
		} else if (end > 0) {
			sum = (l + end) * n / 2;
		} else {
			sum = (l + end - 1) * (n - 1) / 2;
		}
		System.out.println(sum);
	}
} 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();
		int end = l + n - 1;
		int sum;
		if (l >= 0) {
			sum = (l + 1 + end) * (n - 1) / 2;
		} else if (end > 0) {
			sum = (l + end) * n / 2;
		} else {
			sum = (l + end - 1) * (n - 1) / 2;
		}
		System.out.println(sum);
	}
}
