import java.util.*;

class Main{
	public static int n, l;
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	n = sc.nextInt();
      	l = sc.nextInt();
      	
      	if(l > 0) {
      		System.out.println(sum(1));
      	}else if((l + n-1) < 0) {
      		System.out.println(sum(n));
      	}else {
      		System.out.println(sum(1-l));
      	}
    }
	
	public static int sum(int m) {
		int sum = 0;
		for(int i = 1; i <= n; i++) {
			if(i == m) continue;
			//System.out.print(l+i-1);
			//System.out.println();
			sum += (l + i-1);
		}
		return sum;
	}
} import java.util.*; util.* java class Main{
	public static int n, l;
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	n = sc.nextInt();
      	l = sc.nextInt();
      	
      	if(l > 0) {
      		System.out.println(sum(1));
      	}else if((l + n-1) < 0) {
      		System.out.println(sum(n));
      	}else {
      		System.out.println(sum(1-l));
      	}
    }
	
	public static int sum(int m) {
		int sum = 0;
		for(int i = 1; i <= n; i++) {
			if(i == m) continue;
			//System.out.print(l+i-1);
			//System.out.println();
			sum += (l + i-1);
		}
		return sum;
	}
} Main public static int n n l; l public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	n = sc.nextInt();
      	l = sc.nextInt();
      	
      	if(l > 0) {
      		System.out.println(sum(1));
      	}else if((l + n-1) < 0) {
      		System.out.println(sum(n));
      	}else {
      		System.out.println(sum(1-l));
      	}
    } main {
    	Scanner sc = new Scanner(System.in);
      	n = sc.nextInt();
      	l = sc.nextInt();
      	
      	if(l > 0) {
      		System.out.println(sum(1));
      	}else if((l + n-1) < 0) {
      		System.out.println(sum(n));
      	}else {
      		System.out.println(sum(1-l));
      	}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) n = sc.nextInt() n sc.nextInt() sc.nextInt sc l = sc.nextInt() l sc.nextInt() sc.nextInt sc if(l > 0) {
      		System.out.println(sum(1));
      	}else if((l + n-1) < 0) {
      		System.out.println(sum(n));
      	}else {
      		System.out.println(sum(1-l));
      	} l > 0 l 0 {
      		System.out.println(sum(1));
      	} System.out.println(sum(1)) System.out.println System.out System System.out sum(1) sum 1 if((l + n-1) < 0) {
      		System.out.println(sum(n));
      	}else {
      		System.out.println(sum(1-l));
      	} (l + n-1) < 0 (l + n-1) l + n l n 1 0 {
      		System.out.println(sum(n));
      	} System.out.println(sum(n)) System.out.println System.out System System.out sum(n) sum n {
      		System.out.println(sum(1-l));
      	} System.out.println(sum(1-l)) System.out.println System.out System System.out sum(1-l) sum 1-l 1 l String[] args args public static int sum(int m) {
		int sum = 0;
		for(int i = 1; i <= n; i++) {
			if(i == m) continue;
			//System.out.print(l+i-1);
			//System.out.println();
			sum += (l + i-1);
		}
		return sum;
	} sum {
		int sum = 0;
		for(int i = 1; i <= n; i++) {
			if(i == m) continue;
			//System.out.print(l+i-1);
			//System.out.println();
			sum += (l + i-1);
		}
		return sum;
	} int sum = 0; sum 0 for(int i = 1; i <= n; i++) {
			if(i == m) continue;
			//System.out.print(l+i-1);
			//System.out.println();
			sum += (l + i-1);
		} int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
			if(i == m) continue;
			//System.out.print(l+i-1);
			//System.out.println();
			sum += (l + i-1);
		} {
			if(i == m) continue;
			//System.out.print(l+i-1);
			//System.out.println();
			sum += (l + i-1);
		} if(i == m) continue; i == m i m continue; sum += (l + i-1) sum (l + i-1) l + i l i 1 return sum; sum int m m
import java.util.*;

class Main{
	public static int n, l;
	public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
      	n = sc.nextInt();
      	l = sc.nextInt();
      	
      	if(l > 0) {
      		System.out.println(sum(1));
      	}else if((l + n-1) < 0) {
      		System.out.println(sum(n));
      	}else {
      		System.out.println(sum(1-l));
      	}
    }
	
	public static int sum(int m) {
		int sum = 0;
		for(int i = 1; i <= n; i++) {
			if(i == m) continue;
			//System.out.print(l+i-1);
			//System.out.println();
			sum += (l + i-1);
		}
		return sum;
	}
}