import java.util.Arrays;
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 taste[] = new int[n];
		int minTaste = l + 1;
		for(int i = 0 ; i < n ; i++) {
			taste[i] = l + i;
			if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			}
		}
		int sum = Arrays.stream(taste).sum();
		System.out.println(sum - minTaste);
 
		sc.close();
 
	}
 
} import java.util.Arrays; Arrays java.util 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 taste[] = new int[n];
		int minTaste = l + 1;
		for(int i = 0 ; i < n ; i++) {
			taste[i] = l + i;
			if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			}
		}
		int sum = Arrays.stream(taste).sum();
		System.out.println(sum - minTaste);
 
		sc.close();
 
	}
 
} Main public static void main(String[] args) {
 
		Scanner sc = new Scanner(System.in);
 
		int n = sc.nextInt();
		int l = sc.nextInt();
		int taste[] = new int[n];
		int minTaste = l + 1;
		for(int i = 0 ; i < n ; i++) {
			taste[i] = l + i;
			if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			}
		}
		int sum = Arrays.stream(taste).sum();
		System.out.println(sum - minTaste);
 
		sc.close();
 
	} main {
 
		Scanner sc = new Scanner(System.in);
 
		int n = sc.nextInt();
		int l = sc.nextInt();
		int taste[] = new int[n];
		int minTaste = l + 1;
		for(int i = 0 ; i < n ; i++) {
			taste[i] = l + i;
			if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			}
		}
		int sum = Arrays.stream(taste).sum();
		System.out.println(sum - minTaste);
 
		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 taste[] = new int[n]; taste new int[n] n int minTaste = l + 1; minTaste l + 1 l 1 for(int i = 0 ; i < n ; i++) {
			taste[i] = l + i;
			if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			}
		} int i = 0 ; int i = 0 ; i 0 i < n i n i++ i++ i {
			taste[i] = l + i;
			if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			}
		} {
			taste[i] = l + i;
			if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			}
		} taste[i] = l + i taste[i] taste i l + i l i if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			} Math.abs(minTaste) > Math.abs(taste[i]) Math.abs(minTaste) Math.abs Math minTaste Math.abs(taste[i]) Math.abs Math taste[i] taste i {
				minTaste = taste[i];
			} minTaste = taste[i] minTaste taste[i] taste i int sum = Arrays.stream(taste).sum(); sum Arrays.stream(taste).sum() Arrays.stream(taste).sum Arrays.stream(taste) Arrays.stream Arrays taste System.out.println(sum - minTaste) System.out.println System.out System System.out sum - minTaste sum minTaste 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 taste[] = new int[n];
		int minTaste = l + 1;
		for(int i = 0 ; i < n ; i++) {
			taste[i] = l + i;
			if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			}
		}
		int sum = Arrays.stream(taste).sum();
		System.out.println(sum - minTaste);
 
		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 taste[] = new int[n];
		int minTaste = l + 1;
		for(int i = 0 ; i < n ; i++) {
			taste[i] = l + i;
			if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			}
		}
		int sum = Arrays.stream(taste).sum();
		System.out.println(sum - minTaste);
 
		sc.close();
 
	}
 
} Main
import java.util.Arrays;
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 taste[] = new int[n];
		int minTaste = l + 1;
		for(int i = 0 ; i < n ; i++) {
			taste[i] = l + i;
			if(Math.abs(minTaste) > Math.abs(taste[i])) {
				minTaste = taste[i];
			}
		}
		int sum = Arrays.stream(taste).sum();
		System.out.println(sum - minTaste);
 
		sc.close();
 
	}
 
}