import 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 min = L;
		int sum = 0;
		
		for (int i = 1; i <= N; i++) {
			if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			}
			sum += L + i - 1;
		}
		System.out.println(sum - min);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int min = L;
		int sum = 0;
		
		for (int i = 1; i <= N; i++) {
			if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			}
			sum += L + i - 1;
		}
		System.out.println(sum - min);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int min = L;
		int sum = 0;
		
		for (int i = 1; i <= N; i++) {
			if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			}
			sum += L + i - 1;
		}
		System.out.println(sum - min);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int min = L;
		int sum = 0;
		
		for (int i = 1; i <= N; i++) {
			if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			}
			sum += L + i - 1;
		}
		System.out.println(sum - min);
	} 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 min = L; min L int sum = 0; sum 0 for (int i = 1; i <= N; i++) {
			if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			}
			sum += L + i - 1;
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			}
			sum += L + i - 1;
		} {
			if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			}
			sum += L + i - 1;
		} if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			} Math.abs(min) > Math.abs(L + i - 1) Math.abs(min) Math.abs Math min Math.abs(L + i - 1) Math.abs Math L + i - 1 L + i L i 1 {
				min = L + i - 1;
			} min = L + i - 1 min L + i - 1 L + i L i 1 sum += L + i - 1 sum L + i - 1 L + i L i 1 System.out.println(sum - min) System.out.println System.out System System.out sum - min sum min 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 min = L;
		int sum = 0;
		
		for (int i = 1; i <= N; i++) {
			if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			}
			sum += L + i - 1;
		}
		System.out.println(sum - min);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int min = L;
		int sum = 0;
		
		for (int i = 1; i <= N; i++) {
			if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			}
			sum += L + i - 1;
		}
		System.out.println(sum - min);
	}
} Main
import 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 min = L;
		int sum = 0;
		
		for (int i = 1; i <= N; i++) {
			if (Math.abs(min) > Math.abs(L + i - 1)) {
				min = L + i - 1;
			}
			sum += L + i - 1;
		}
		System.out.println(sum - min);
	}
}