import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int l = sc.nextInt();
		int ans = 0;
		int abs = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
			ans += i + l;
			if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			}
		}
		System.out.println(ans - abs);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int l = sc.nextInt();
		int ans = 0;
		int abs = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
			ans += i + l;
			if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			}
		}
		System.out.println(ans - abs);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int l = sc.nextInt();
		int ans = 0;
		int abs = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
			ans += i + l;
			if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			}
		}
		System.out.println(ans - abs);
	} main {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int l = sc.nextInt();
		int ans = 0;
		int abs = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
			ans += i + l;
			if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			}
		}
		System.out.println(ans - abs);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc int ans = 0; ans 0 int abs = Integer.MAX_VALUE; abs Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < n; i++) {
			ans += i + l;
			if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			}
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			ans += i + l;
			if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			}
		} {
			ans += i + l;
			if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			}
		} ans += i + l ans i + l i l if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			} Math.abs(abs) >= Math.abs(i + l) Math.abs(abs) Math.abs Math abs Math.abs(i + l) Math.abs Math i + l i l {
				abs = i + l;
			} abs = i + l abs i + l i l System.out.println(ans - abs) System.out.println System.out System System.out ans - abs ans abs String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int l = sc.nextInt();
		int ans = 0;
		int abs = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
			ans += i + l;
			if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			}
		}
		System.out.println(ans - abs);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int l = sc.nextInt();
		int ans = 0;
		int abs = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
			ans += i + l;
			if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			}
		}
		System.out.println(ans - abs);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();
		int n = sc.nextInt();
		int l = sc.nextInt();
		int ans = 0;
		int abs = Integer.MAX_VALUE;
		for (int i = 0; i < n; i++) {
			ans += i + l;
			if (Math.abs(abs) >= Math.abs(i + l)) {
				abs = i + l;
			}
		}
		System.out.println(ans - abs);
	}
}
