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 max = l + n - 1;
		int sum = (l + max) * n / 2;
		
		if (max < 0) sum -= max;
		if (l > 0) sum -= l;
		
		System.out.println(sum);
		
		sc.close();
	}
	
}

 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 max = l + n - 1;
		int sum = (l + max) * n / 2;
		
		if (max < 0) sum -= max;
		if (l > 0) sum -= l;
		
		System.out.println(sum);
		
		sc.close();
	}
	
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		
		
		int max = l + n - 1;
		int sum = (l + max) * n / 2;
		
		if (max < 0) sum -= max;
		if (l > 0) sum -= l;
		
		System.out.println(sum);
		
		sc.close();
	} main {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int l = sc.nextInt();
		
		
		int max = l + n - 1;
		int sum = (l + max) * n / 2;
		
		if (max < 0) sum -= max;
		if (l > 0) sum -= l;
		
		System.out.println(sum);
		
		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 max = l + n - 1; max l + n - 1 l + n l n 1 int sum = (l + max) * n / 2; sum (l + max) * n / 2 (l + max) * n (l + max) l max n 2 if (max < 0) sum -= max; max < 0 max 0 sum -= max sum max if (l > 0) sum -= l; l > 0 l 0 sum -= l sum l System.out.println(sum) System.out.println System.out System System.out sum 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 max = l + n - 1;
		int sum = (l + max) * n / 2;
		
		if (max < 0) sum -= max;
		if (l > 0) sum -= l;
		
		System.out.println(sum);
		
		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 max = l + n - 1;
		int sum = (l + max) * n / 2;
		
		if (max < 0) sum -= max;
		if (l > 0) sum -= l;
		
		System.out.println(sum);
		
		sc.close();
	}
	
} 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 max = l + n - 1;
		int sum = (l + max) * n / 2;
		
		if (max < 0) sum -= max;
		if (l > 0) sum -= l;
		
		System.out.println(sum);
		
		sc.close();
	}
	
}


