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

