import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()) {
			int N = sc.nextInt(), L = sc.nextInt();
			int[] taste = new int[N];
			int sum = 0;
			for(int i = 0; i < N; i++) {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			}
			int ans = 0, abs = Integer.MAX_VALUE;
			for(int i = 0; i < N; i++) {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			}
			System.out.println(ans);
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()) {
			int N = sc.nextInt(), L = sc.nextInt();
			int[] taste = new int[N];
			int sum = 0;
			for(int i = 0; i < N; i++) {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			}
			int ans = 0, abs = Integer.MAX_VALUE;
			for(int i = 0; i < N; i++) {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			}
			System.out.println(ans);
		}
	}
} Main public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()) {
			int N = sc.nextInt(), L = sc.nextInt();
			int[] taste = new int[N];
			int sum = 0;
			for(int i = 0; i < N; i++) {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			}
			int ans = 0, abs = Integer.MAX_VALUE;
			for(int i = 0; i < N; i++) {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			}
			System.out.println(ans);
		}
	} main {
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()) {
			int N = sc.nextInt(), L = sc.nextInt();
			int[] taste = new int[N];
			int sum = 0;
			for(int i = 0; i < N; i++) {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			}
			int ans = 0, abs = Integer.MAX_VALUE;
			for(int i = 0; i < N; i++) {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			}
			System.out.println(ans);
		}
	} Scanner sc=new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()) {
			int N = sc.nextInt(), L = sc.nextInt();
			int[] taste = new int[N];
			int sum = 0;
			for(int i = 0; i < N; i++) {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			}
			int ans = 0, abs = Integer.MAX_VALUE;
			for(int i = 0; i < N; i++) {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			}
			System.out.println(ans);
		} sc.hasNext() sc.hasNext sc {
			int N = sc.nextInt(), L = sc.nextInt();
			int[] taste = new int[N];
			int sum = 0;
			for(int i = 0; i < N; i++) {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			}
			int ans = 0, abs = Integer.MAX_VALUE;
			for(int i = 0; i < N; i++) {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			}
			System.out.println(ans);
		} int N = sc.nextInt() N sc.nextInt() sc.nextInt sc L = sc.nextInt(); L sc.nextInt() sc.nextInt sc int[] taste = new int[N]; taste new int[N] N int sum = 0; sum 0 for(int i = 0; i < N; i++) {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			} {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			} taste[i] = L + (i + 1) - 1 taste[i] taste i L + (i + 1) - 1 L + (i + 1) L (i + 1) i 1 1 sum += taste[i] sum taste[i] taste i int ans = 0 ans 0 abs = Integer.MAX_VALUE; abs Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i = 0; i < N; i++) {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			} {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			} if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				} Math.abs(taste[i]) < abs Math.abs(taste[i]) Math.abs Math taste[i] taste i abs {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				} abs = Math.abs(taste[i]) abs Math.abs(taste[i]) Math.abs Math taste[i] taste i ans = sum - taste[i] ans sum - taste[i] sum taste[i] taste i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()) {
			int N = sc.nextInt(), L = sc.nextInt();
			int[] taste = new int[N];
			int sum = 0;
			for(int i = 0; i < N; i++) {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			}
			int ans = 0, abs = Integer.MAX_VALUE;
			for(int i = 0; i < N; i++) {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			}
			System.out.println(ans);
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()) {
			int N = sc.nextInt(), L = sc.nextInt();
			int[] taste = new int[N];
			int sum = 0;
			for(int i = 0; i < N; i++) {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			}
			int ans = 0, abs = Integer.MAX_VALUE;
			for(int i = 0; i < N; i++) {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			}
			System.out.println(ans);
		}
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()) {
			int N = sc.nextInt(), L = sc.nextInt();
			int[] taste = new int[N];
			int sum = 0;
			for(int i = 0; i < N; i++) {
				taste[i] = L + (i + 1) - 1;
				sum += taste[i];
			}
			int ans = 0, abs = Integer.MAX_VALUE;
			for(int i = 0; i < N; i++) {
				if(Math.abs(taste[i]) < abs) {
					abs = Math.abs(taste[i]);
					ans = sum - taste[i];
				}
			}
			System.out.println(ans);
		}
	}
}