import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int L  = keyboard.nextInt();
		
		int sum = 0;
		int z = 1000;
		
		for(int i = 1; i < N+1; i++){
			sum += L+i-1;
				if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				}
		}

		System.out.println(sum-z);
		keyboard.close();	
	}
} import java.util.*; util.* java public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int L  = keyboard.nextInt();
		
		int sum = 0;
		int z = 1000;
		
		for(int i = 1; i < N+1; i++){
			sum += L+i-1;
				if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				}
		}

		System.out.println(sum-z);
		keyboard.close();	
	}
} Main public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int L  = keyboard.nextInt();
		
		int sum = 0;
		int z = 1000;
		
		for(int i = 1; i < N+1; i++){
			sum += L+i-1;
				if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				}
		}

		System.out.println(sum-z);
		keyboard.close();	
	} main {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int L  = keyboard.nextInt();
		
		int sum = 0;
		int z = 1000;
		
		for(int i = 1; i < N+1; i++){
			sum += L+i-1;
				if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				}
		}

		System.out.println(sum-z);
		keyboard.close();	
	} Scanner keyboard = new Scanner(System.in); keyboard new Scanner(System.in) int N  = keyboard.nextInt(); N keyboard.nextInt() keyboard.nextInt keyboard int L  = keyboard.nextInt(); L keyboard.nextInt() keyboard.nextInt keyboard int sum = 0; sum 0 int z = 1000; z 1000 for(int i = 1; i < N+1; i++){
			sum += L+i-1;
				if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				}
		} int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 i++ i++ i {
			sum += L+i-1;
				if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				}
		} {
			sum += L+i-1;
				if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				}
		} sum += L+i-1 sum L+i-1 L+i L i 1 if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				} Math.abs(z) > Math.abs(L+i-1) Math.abs(z) Math.abs Math z Math.abs(L+i-1) Math.abs Math L+i-1 L+i L i 1 {
					z = L+i-1;
				} z = L+i-1 z L+i-1 L+i L i 1 System.out.println(sum-z) System.out.println System.out System System.out sum-z sum z keyboard.close() keyboard.close keyboard String[] args args public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int L  = keyboard.nextInt();
		
		int sum = 0;
		int z = 1000;
		
		for(int i = 1; i < N+1; i++){
			sum += L+i-1;
				if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				}
		}

		System.out.println(sum-z);
		keyboard.close();	
	}
} public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int L  = keyboard.nextInt();
		
		int sum = 0;
		int z = 1000;
		
		for(int i = 1; i < N+1; i++){
			sum += L+i-1;
				if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				}
		}

		System.out.println(sum-z);
		keyboard.close();	
	}
} Main
import java.util.*;

public class Main {
public static void main(String[] args) {
		
		Scanner keyboard = new Scanner(System.in); 
		
		int N  = keyboard.nextInt();
		int L  = keyboard.nextInt();
		
		int sum = 0;
		int z = 1000;
		
		for(int i = 1; i < N+1; i++){
			sum += L+i-1;
				if(Math.abs(z) > Math.abs(L+i-1)){
					z = L+i-1;
				}
		}

		System.out.println(sum-z);
		keyboard.close();	
	}
}
