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