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 min=99999,sum=0;

		for(int i=1;i<=n;i++) {
			if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			}
			sum+=l+i-1;
		}
		System.out.println(sum-min);


	}
}
/*
 6
khabarovsk 20
moscow 10
kazan 50
kazan 35
moscow 60
khabarovsk 40
 */

//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));

 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 min=99999,sum=0;

		for(int i=1;i<=n;i++) {
			if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			}
			sum+=l+i-1;
		}
		System.out.println(sum-min);


	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int l=sc.nextInt();
		int min=99999,sum=0;

		for(int i=1;i<=n;i++) {
			if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			}
			sum+=l+i-1;
		}
		System.out.println(sum-min);


	} main {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int l=sc.nextInt();
		int min=99999,sum=0;

		for(int i=1;i<=n;i++) {
			if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			}
			sum+=l+i-1;
		}
		System.out.println(sum-min);


	} 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 min=99999 min 99999 sum=0; sum 0 for(int i=1;i<=n;i++) {
			if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			}
			sum+=l+i-1;
		} int i=1; int i=1; i 1 i<=n i n i++ i++ i {
			if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			}
			sum+=l+i-1;
		} {
			if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			}
			sum+=l+i-1;
		} if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			} l+i-1<0 l+i-1 l+i l i 1 0 {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			} min=-1*Math.min(Math.abs(l+i-1),Math.abs(min)) min -1*Math.min(Math.abs(l+i-1),Math.abs(min)) -1 1 Math.min(Math.abs(l+i-1),Math.abs(min)) Math.min Math Math.abs(l+i-1) Math.abs Math l+i-1 l+i l i 1 Math.abs(min) Math.abs Math min {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			} min=Math.min(Math.abs(l+i-1),Math.abs(min)) min Math.min(Math.abs(l+i-1),Math.abs(min)) Math.min Math Math.abs(l+i-1) Math.abs Math l+i-1 l+i l i 1 Math.abs(min) Math.abs Math min sum+=l+i-1 sum l+i-1 l+i l i 1 System.out.println(sum-min) System.out.println System.out System System.out sum-min sum min 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 min=99999,sum=0;

		for(int i=1;i<=n;i++) {
			if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			}
			sum+=l+i-1;
		}
		System.out.println(sum-min);


	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n=sc.nextInt();
		int l=sc.nextInt();
		int min=99999,sum=0;

		for(int i=1;i<=n;i++) {
			if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			}
			sum+=l+i-1;
		}
		System.out.println(sum-min);


	}
} 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 min=99999,sum=0;

		for(int i=1;i<=n;i++) {
			if(l+i-1<0) {
				min=-1*Math.min(Math.abs(l+i-1),Math.abs(min));
			}else {
				min=Math.min(Math.abs(l+i-1),Math.abs(min));
			}
			sum+=l+i-1;
		}
		System.out.println(sum-min);


	}
}
/*
 6
khabarovsk 20
moscow 10
kazan 50
kazan 35
moscow 60
khabarovsk 40
 */

//Arrays.sort(array, (a, b) -> Integer.compare(a[0], b[0]));


