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 tot = 0, mn = 500000;
		for(int i = 1; i <= n; i++){
			tot = tot + (l + i -1);
			if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1;
		}

		tot = tot - mn;
		System.out.println(tot);
	}
} 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 tot = 0, mn = 500000;
		for(int i = 1; i <= n; i++){
			tot = tot + (l + i -1);
			if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1;
		}

		tot = tot - mn;
		System.out.println(tot);
	}
} Main public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int tot = 0, mn = 500000;
		for(int i = 1; i <= n; i++){
			tot = tot + (l + i -1);
			if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1;
		}

		tot = tot - mn;
		System.out.println(tot);
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int tot = 0, mn = 500000;
		for(int i = 1; i <= n; i++){
			tot = tot + (l + i -1);
			if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1;
		}

		tot = tot - mn;
		System.out.println(tot);
	} 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 tot = 0 tot 0 mn = 500000; mn 500000 for(int i = 1; i <= n; i++){
			tot = tot + (l + i -1);
			if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1;
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			tot = tot + (l + i -1);
			if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1;
		} {
			tot = tot + (l + i -1);
			if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1;
		} tot = tot + (l + i -1) tot tot + (l + i -1) tot (l + i -1) l + i l i 1 if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1; Math.abs(mn) > Math.abs(l+i-1) Math.abs(mn) Math.abs Math mn Math.abs(l+i-1) Math.abs Math l+i-1 l+i l i 1 mn = l+i-1 mn l+i-1 l+i l i 1 tot = tot - mn tot tot - mn tot mn System.out.println(tot) System.out.println System.out System System.out tot 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 tot = 0, mn = 500000;
		for(int i = 1; i <= n; i++){
			tot = tot + (l + i -1);
			if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1;
		}

		tot = tot - mn;
		System.out.println(tot);
	}
} public class Main{
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		int tot = 0, mn = 500000;
		for(int i = 1; i <= n; i++){
			tot = tot + (l + i -1);
			if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1;
		}

		tot = tot - mn;
		System.out.println(tot);
	}
} 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 tot = 0, mn = 500000;
		for(int i = 1; i <= n; i++){
			tot = tot + (l + i -1);
			if( Math.abs(mn) > Math.abs(l+i-1) )
				mn = l+i-1;
		}

		tot = tot - mn;
		System.out.println(tot);
	}
}