import java.io.PrintWriter;
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int sum = n*l +  n*(1+n)/2 - n;
		// 全て正の場合
		if(l>0) sum -= l;
		// 全て負の場合
		else if(l + n - 1<0) sum -= l+n-1;
		out.println(sum);

		out.flush();
	}
} import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int sum = n*l +  n*(1+n)/2 - n;
		// 全て正の場合
		if(l>0) sum -= l;
		// 全て負の場合
		else if(l + n - 1<0) sum -= l+n-1;
		out.println(sum);

		out.flush();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int sum = n*l +  n*(1+n)/2 - n;
		// 全て正の場合
		if(l>0) sum -= l;
		// 全て負の場合
		else if(l + n - 1<0) sum -= l+n-1;
		out.println(sum);

		out.flush();
	} main {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int sum = n*l +  n*(1+n)/2 - n;
		// 全て正の場合
		if(l>0) sum -= l;
		// 全て負の場合
		else if(l + n - 1<0) sum -= l+n-1;
		out.println(sum);

		out.flush();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc int sum = n*l +  n*(1+n)/2 - n; sum n*l +  n*(1+n)/2 - n n*l +  n*(1+n)/2 n*l n l n*(1+n)/2 n*(1+n) n (1+n) 1 n 2 n if(l>0) sum -= l;
		// 全て負の場合
		else if(l + n - 1<0) sum -= l+n-1; l>0 l 0 sum -= l sum l if(l + n - 1<0) sum -= l+n-1; l + n - 1<0 l + n - 1 l + n l n 1 0 sum -= l+n-1 sum l+n-1 l+n l n 1 out.println(sum) out.println out sum out.flush() out.flush out String[] args args
import java.io.PrintWriter;
import java.util.Scanner;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int sum = n*l +  n*(1+n)/2 - n;
		// 全て正の場合
		if(l>0) sum -= l;
		// 全て負の場合
		else if(l + n - 1<0) sum -= l+n-1;
		out.println(sum);

		out.flush();
	}
}
