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