import java.util.*;
public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int sum = 0;
			int[] array = new int[n];
			for(int i = 0;i<n;i++) {
				array[i] = l+i;
				sum+=array[i];
			}
			int min = array[0];
			for(int num : array) {
				if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				}
				if(num == 0) {
					min = 0;
					break;
				}
			}
			System.out.println(sum-min);
			
			sc.close();
		}
	public static void main(String[] args) {
		solve();

	}

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

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int sum = 0;
			int[] array = new int[n];
			for(int i = 0;i<n;i++) {
				array[i] = l+i;
				sum+=array[i];
			}
			int min = array[0];
			for(int num : array) {
				if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				}
				if(num == 0) {
					min = 0;
					break;
				}
			}
			System.out.println(sum-min);
			
			sc.close();
		}
	public static void main(String[] args) {
		solve();

	}

} Main static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int sum = 0;
			int[] array = new int[n];
			for(int i = 0;i<n;i++) {
				array[i] = l+i;
				sum+=array[i];
			}
			int min = array[0];
			for(int num : array) {
				if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				}
				if(num == 0) {
					min = 0;
					break;
				}
			}
			System.out.println(sum-min);
			
			sc.close();
		} solve {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int sum = 0;
			int[] array = new int[n];
			for(int i = 0;i<n;i++) {
				array[i] = l+i;
				sum+=array[i];
			}
			int min = array[0];
			for(int num : array) {
				if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				}
				if(num == 0) {
					min = 0;
					break;
				}
			}
			System.out.println(sum-min);
			
			sc.close();
		} 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 sum = 0; sum 0 int[] array = new int[n]; array new int[n] n for(int i = 0;i<n;i++) {
				array[i] = l+i;
				sum+=array[i];
			} int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
				array[i] = l+i;
				sum+=array[i];
			} {
				array[i] = l+i;
				sum+=array[i];
			} array[i] = l+i array[i] array i l+i l i sum+=array[i] sum array[i] array i int min = array[0]; min array[0] array 0 for(int num : array) {
				if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				}
				if(num == 0) {
					min = 0;
					break;
				}
			} int num array {
				if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				}
				if(num == 0) {
					min = 0;
					break;
				}
			} {
				if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				}
				if(num == 0) {
					min = 0;
					break;
				}
			} if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				} num>0 num 0 {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				} if(num<=min) 
					min = num; num<=min num min min = num min num if(num == 0) {
					min = 0;
					break;
				} num == 0 num 0 {
					min = 0;
					break;
				} min = 0 min 0 break; if(num<0) {
					if(num>=min) 
						min = num;
				} num<0 num 0 {
					if(num>=min) 
						min = num;
				} if(num>=min) 
						min = num; num>=min num min min = num min num if(num == 0) {
					min = 0;
					break;
				} num == 0 num 0 {
					min = 0;
					break;
				} min = 0 min 0 break; System.out.println(sum-min) System.out.println System.out System System.out sum-min sum min sc.close() sc.close sc public static void main(String[] args) {
		solve();

	} main {
		solve();

	} solve() solve String[] args args public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int sum = 0;
			int[] array = new int[n];
			for(int i = 0;i<n;i++) {
				array[i] = l+i;
				sum+=array[i];
			}
			int min = array[0];
			for(int num : array) {
				if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				}
				if(num == 0) {
					min = 0;
					break;
				}
			}
			System.out.println(sum-min);
			
			sc.close();
		}
	public static void main(String[] args) {
		solve();

	}

} public class Main {

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int sum = 0;
			int[] array = new int[n];
			for(int i = 0;i<n;i++) {
				array[i] = l+i;
				sum+=array[i];
			}
			int min = array[0];
			for(int num : array) {
				if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				}
				if(num == 0) {
					min = 0;
					break;
				}
			}
			System.out.println(sum-min);
			
			sc.close();
		}
	public static void main(String[] args) {
		solve();

	}

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

		static void solve() {
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			int l = sc.nextInt();
			int sum = 0;
			int[] array = new int[n];
			for(int i = 0;i<n;i++) {
				array[i] = l+i;
				sum+=array[i];
			}
			int min = array[0];
			for(int num : array) {
				if(num>0) {
				if(num<=min) 
					min = num;
				if(num == 0) {
					min = 0;
					break;
				}
				}
				else if(num<0) {
					if(num>=min) 
						min = num;
				}
				if(num == 0) {
					min = 0;
					break;
				}
			}
			System.out.println(sum-min);
			
			sc.close();
		}
	public static void main(String[] args) {
		solve();

	}

}
