import java.util.Scanner;
public class Main{

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int l = stdIn.nextInt();
		
		int cnt = 0;
		int min = Integer.MAX_VALUE;
		int index = 0;
		int [] apples = new int[n];
		
		
		for(int i = 0; i < n; i++) {
			cnt += l+i;
			int abs = Math.abs(l+i);
			apples[i] = l+i;
			
			if(min > abs) {
				min = abs;
				index = i;
			}
			
		}
		
		System.out.println(cnt-apples[index]);
		
		
		
		
	}

} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int l = stdIn.nextInt();
		
		int cnt = 0;
		int min = Integer.MAX_VALUE;
		int index = 0;
		int [] apples = new int[n];
		
		
		for(int i = 0; i < n; i++) {
			cnt += l+i;
			int abs = Math.abs(l+i);
			apples[i] = l+i;
			
			if(min > abs) {
				min = abs;
				index = i;
			}
			
		}
		
		System.out.println(cnt-apples[index]);
		
		
		
		
	}

} Main public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int l = stdIn.nextInt();
		
		int cnt = 0;
		int min = Integer.MAX_VALUE;
		int index = 0;
		int [] apples = new int[n];
		
		
		for(int i = 0; i < n; i++) {
			cnt += l+i;
			int abs = Math.abs(l+i);
			apples[i] = l+i;
			
			if(min > abs) {
				min = abs;
				index = i;
			}
			
		}
		
		System.out.println(cnt-apples[index]);
		
		
		
		
	} main {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int l = stdIn.nextInt();
		
		int cnt = 0;
		int min = Integer.MAX_VALUE;
		int index = 0;
		int [] apples = new int[n];
		
		
		for(int i = 0; i < n; i++) {
			cnt += l+i;
			int abs = Math.abs(l+i);
			apples[i] = l+i;
			
			if(min > abs) {
				min = abs;
				index = i;
			}
			
		}
		
		System.out.println(cnt-apples[index]);
		
		
		
		
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int l = stdIn.nextInt(); l stdIn.nextInt() stdIn.nextInt stdIn int cnt = 0; cnt 0 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int index = 0; index 0 int [] apples = new int[n]; apples new int[n] n for(int i = 0; i < n; i++) {
			cnt += l+i;
			int abs = Math.abs(l+i);
			apples[i] = l+i;
			
			if(min > abs) {
				min = abs;
				index = i;
			}
			
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			cnt += l+i;
			int abs = Math.abs(l+i);
			apples[i] = l+i;
			
			if(min > abs) {
				min = abs;
				index = i;
			}
			
		} {
			cnt += l+i;
			int abs = Math.abs(l+i);
			apples[i] = l+i;
			
			if(min > abs) {
				min = abs;
				index = i;
			}
			
		} cnt += l+i cnt l+i l i int abs = Math.abs(l+i); abs Math.abs(l+i) Math.abs Math l+i l i apples[i] = l+i apples[i] apples i l+i l i if(min > abs) {
				min = abs;
				index = i;
			} min > abs min abs {
				min = abs;
				index = i;
			} min = abs min abs index = i index i System.out.println(cnt-apples[index]) System.out.println System.out System System.out cnt-apples[index] cnt apples[index] apples index String[] args args public class Main{

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int l = stdIn.nextInt();
		
		int cnt = 0;
		int min = Integer.MAX_VALUE;
		int index = 0;
		int [] apples = new int[n];
		
		
		for(int i = 0; i < n; i++) {
			cnt += l+i;
			int abs = Math.abs(l+i);
			apples[i] = l+i;
			
			if(min > abs) {
				min = abs;
				index = i;
			}
			
		}
		
		System.out.println(cnt-apples[index]);
		
		
		
		
	}

} public class Main{

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int l = stdIn.nextInt();
		
		int cnt = 0;
		int min = Integer.MAX_VALUE;
		int index = 0;
		int [] apples = new int[n];
		
		
		for(int i = 0; i < n; i++) {
			cnt += l+i;
			int abs = Math.abs(l+i);
			apples[i] = l+i;
			
			if(min > abs) {
				min = abs;
				index = i;
			}
			
		}
		
		System.out.println(cnt-apples[index]);
		
		
		
		
	}

} Main
import java.util.Scanner;
public class Main{

	public static void main(String[] args) {
		Scanner stdIn = new Scanner(System.in);
		
		int n = stdIn.nextInt();
		int l = stdIn.nextInt();
		
		int cnt = 0;
		int min = Integer.MAX_VALUE;
		int index = 0;
		int [] apples = new int[n];
		
		
		for(int i = 0; i < n; i++) {
			cnt += l+i;
			int abs = Math.abs(l+i);
			apples[i] = l+i;
			
			if(min > abs) {
				min = abs;
				index = i;
			}
			
		}
		
		System.out.println(cnt-apples[index]);
		
		
		
		
	}

}
