import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int L = Integer.parseInt(sc.next());
		int a = N * L;
		int b = N * (N - 1) / 2;
		
		if(L >= 0) {	
			int result = a + b - L;
			System.out.println(result);
		}else if(L < 0) {
			int last = L + N -1;
			if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			}
		}
	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int L = Integer.parseInt(sc.next());
		int a = N * L;
		int b = N * (N - 1) / 2;
		
		if(L >= 0) {	
			int result = a + b - L;
			System.out.println(result);
		}else if(L < 0) {
			int last = L + N -1;
			if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			}
		}
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int L = Integer.parseInt(sc.next());
		int a = N * L;
		int b = N * (N - 1) / 2;
		
		if(L >= 0) {	
			int result = a + b - L;
			System.out.println(result);
		}else if(L < 0) {
			int last = L + N -1;
			if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			}
		}
	} main {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int L = Integer.parseInt(sc.next());
		int a = N * L;
		int b = N * (N - 1) / 2;
		
		if(L >= 0) {	
			int result = a + b - L;
			System.out.println(result);
		}else if(L < 0) {
			int last = L + N -1;
			if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			}
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int L = Integer.parseInt(sc.next()); L Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int a = N * L; a N * L N L int b = N * (N - 1) / 2; b N * (N - 1) / 2 N * (N - 1) N (N - 1) N 1 2 if(L >= 0) {	
			int result = a + b - L;
			System.out.println(result);
		}else if(L < 0) {
			int last = L + N -1;
			if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			}
		} L >= 0 L 0 {	
			int result = a + b - L;
			System.out.println(result);
		} int result = a + b - L; result a + b - L a + b a b L System.out.println(result) System.out.println System.out System System.out result if(L < 0) {
			int last = L + N -1;
			if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			}
		} L < 0 L 0 {
			int last = L + N -1;
			if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			}
		} int last = L + N -1; last L + N -1 L + N L N 1 if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			} last < 0 last 0 {
				int res = a + b - last;
				System.out.println(res);
			} int res = a + b - last; res a + b - last a + b a b last System.out.println(res) System.out.println System.out System System.out res {
				System.out.println(a + b);
			} System.out.println(a + b) System.out.println System.out System System.out a + b a b String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int L = Integer.parseInt(sc.next());
		int a = N * L;
		int b = N * (N - 1) / 2;
		
		if(L >= 0) {	
			int result = a + b - L;
			System.out.println(result);
		}else if(L < 0) {
			int last = L + N -1;
			if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			}
		}
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int L = Integer.parseInt(sc.next());
		int a = N * L;
		int b = N * (N - 1) / 2;
		
		if(L >= 0) {	
			int result = a + b - L;
			System.out.println(result);
		}else if(L < 0) {
			int last = L + N -1;
			if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			}
		}
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
		int L = Integer.parseInt(sc.next());
		int a = N * L;
		int b = N * (N - 1) / 2;
		
		if(L >= 0) {	
			int result = a + b - L;
			System.out.println(result);
		}else if(L < 0) {
			int last = L + N -1;
			if(last < 0) {
				int res = a + b - last;
				System.out.println(res);
			}else {
				System.out.println(a + b);
			}
		}
	}

}
