import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int L = scan.nextInt();

		int[] t = new int[N];
		
		int select = 0;
		int tmp = 300;
		for(int i = 0; i < N; i++) {
			t[i] = L + i;
			int val = Math.abs(t[i]);
			if(tmp > val) {
				select = i;
				tmp = val;
			}
		}
		
		t[select] = 0;
		int ans = 0;
		for(int a: t) {
			ans += a;
		}
		
		System.out.println(ans);
		scan.close();
	}

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

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int L = scan.nextInt();

		int[] t = new int[N];
		
		int select = 0;
		int tmp = 300;
		for(int i = 0; i < N; i++) {
			t[i] = L + i;
			int val = Math.abs(t[i]);
			if(tmp > val) {
				select = i;
				tmp = val;
			}
		}
		
		t[select] = 0;
		int ans = 0;
		for(int a: t) {
			ans += a;
		}
		
		System.out.println(ans);
		scan.close();
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int L = scan.nextInt();

		int[] t = new int[N];
		
		int select = 0;
		int tmp = 300;
		for(int i = 0; i < N; i++) {
			t[i] = L + i;
			int val = Math.abs(t[i]);
			if(tmp > val) {
				select = i;
				tmp = val;
			}
		}
		
		t[select] = 0;
		int ans = 0;
		for(int a: t) {
			ans += a;
		}
		
		System.out.println(ans);
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int L = scan.nextInt();

		int[] t = new int[N];
		
		int select = 0;
		int tmp = 300;
		for(int i = 0; i < N; i++) {
			t[i] = L + i;
			int val = Math.abs(t[i]);
			if(tmp > val) {
				select = i;
				tmp = val;
			}
		}
		
		t[select] = 0;
		int ans = 0;
		for(int a: t) {
			ans += a;
		}
		
		System.out.println(ans);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int L = scan.nextInt(); L scan.nextInt() scan.nextInt scan int[] t = new int[N]; t new int[N] N int select = 0; select 0 int tmp = 300; tmp 300 for(int i = 0; i < N; i++) {
			t[i] = L + i;
			int val = Math.abs(t[i]);
			if(tmp > val) {
				select = i;
				tmp = val;
			}
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			t[i] = L + i;
			int val = Math.abs(t[i]);
			if(tmp > val) {
				select = i;
				tmp = val;
			}
		} {
			t[i] = L + i;
			int val = Math.abs(t[i]);
			if(tmp > val) {
				select = i;
				tmp = val;
			}
		} t[i] = L + i t[i] t i L + i L i int val = Math.abs(t[i]); val Math.abs(t[i]) Math.abs Math t[i] t i if(tmp > val) {
				select = i;
				tmp = val;
			} tmp > val tmp val {
				select = i;
				tmp = val;
			} select = i select i tmp = val tmp val t[select] = 0 t[select] t select 0 int ans = 0; ans 0 for(int a: t) {
			ans += a;
		} int a t {
			ans += a;
		} {
			ans += a;
		} ans += a ans a System.out.println(ans) System.out.println System.out System System.out ans scan.close() scan.close scan String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int L = scan.nextInt();

		int[] t = new int[N];
		
		int select = 0;
		int tmp = 300;
		for(int i = 0; i < N; i++) {
			t[i] = L + i;
			int val = Math.abs(t[i]);
			if(tmp > val) {
				select = i;
				tmp = val;
			}
		}
		
		t[select] = 0;
		int ans = 0;
		for(int a: t) {
			ans += a;
		}
		
		System.out.println(ans);
		scan.close();
	}

} public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int L = scan.nextInt();

		int[] t = new int[N];
		
		int select = 0;
		int tmp = 300;
		for(int i = 0; i < N; i++) {
			t[i] = L + i;
			int val = Math.abs(t[i]);
			if(tmp > val) {
				select = i;
				tmp = val;
			}
		}
		
		t[select] = 0;
		int ans = 0;
		for(int a: t) {
			ans += a;
		}
		
		System.out.println(ans);
		scan.close();
	}

} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int L = scan.nextInt();

		int[] t = new int[N];
		
		int select = 0;
		int tmp = 300;
		for(int i = 0; i < N; i++) {
			t[i] = L + i;
			int val = Math.abs(t[i]);
			if(tmp > val) {
				select = i;
				tmp = val;
			}
		}
		
		t[select] = 0;
		int ans = 0;
		for(int a: t) {
			ans += a;
		}
		
		System.out.println(ans);
		scan.close();
	}

}
