import java.util.Scanner;

public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);


	//List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int L = std.nextInt();
	int Lsum = 0;
	int Ltemp = L;
	//String S = std.next();

	if(L <= 0 && Math.abs(L) < N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum +L;
			L++;
		}
	}


	else if(L <= 0 && Math.abs(L) >= N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - L + 1;
	}

//-5,-4,-3=-12.
	else {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - Ltemp;
	}

	System.out.println(Lsum);


	  }


	}

 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);


	//List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int L = std.nextInt();
	int Lsum = 0;
	int Ltemp = L;
	//String S = std.next();

	if(L <= 0 && Math.abs(L) < N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum +L;
			L++;
		}
	}


	else if(L <= 0 && Math.abs(L) >= N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - L + 1;
	}

//-5,-4,-3=-12.
	else {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - Ltemp;
	}

	System.out.println(Lsum);


	  }


	} Main public static void main(String args[]) {

	Scanner std = new Scanner(System.in);


	//List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int L = std.nextInt();
	int Lsum = 0;
	int Ltemp = L;
	//String S = std.next();

	if(L <= 0 && Math.abs(L) < N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum +L;
			L++;
		}
	}


	else if(L <= 0 && Math.abs(L) >= N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - L + 1;
	}

//-5,-4,-3=-12.
	else {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - Ltemp;
	}

	System.out.println(Lsum);


	  } main {

	Scanner std = new Scanner(System.in);


	//List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int L = std.nextInt();
	int Lsum = 0;
	int Ltemp = L;
	//String S = std.next();

	if(L <= 0 && Math.abs(L) < N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum +L;
			L++;
		}
	}


	else if(L <= 0 && Math.abs(L) >= N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - L + 1;
	}

//-5,-4,-3=-12.
	else {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - Ltemp;
	}

	System.out.println(Lsum);


	  } Scanner std = new Scanner(System.in); std new Scanner(System.in) int N = std.nextInt(); N std.nextInt() std.nextInt std int L = std.nextInt(); L std.nextInt() std.nextInt std int Lsum = 0; Lsum 0 int Ltemp = L; Ltemp L if(L <= 0 && Math.abs(L) < N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum +L;
			L++;
		}
	}


	else if(L <= 0 && Math.abs(L) >= N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - L + 1;
	}

//-5,-4,-3=-12.
	else {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - Ltemp;
	} L <= 0 && Math.abs(L) < N L <= 0 L 0 Math.abs(L) < N Math.abs(L) Math.abs Math L N {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum +L;
			L++;
		}
	} for(int i = 0; i < N; i++) {
			Lsum = Lsum +L;
			L++;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			Lsum = Lsum +L;
			L++;
		} {
			Lsum = Lsum +L;
			L++;
		} Lsum = Lsum +L Lsum Lsum +L Lsum L L++ L if(L <= 0 && Math.abs(L) >= N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - L + 1;
	}

//-5,-4,-3=-12.
	else {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - Ltemp;
	} L <= 0 && Math.abs(L) >= N L <= 0 L 0 Math.abs(L) >= N Math.abs(L) Math.abs Math L N {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - L + 1;
	} for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			Lsum = Lsum + L;
			L++;
		} {
			Lsum = Lsum + L;
			L++;
		} Lsum = Lsum + L Lsum Lsum + L Lsum L L++ L Lsum = Lsum - L + 1 Lsum Lsum - L + 1 Lsum - L Lsum L 1 {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - Ltemp;
	} for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			Lsum = Lsum + L;
			L++;
		} {
			Lsum = Lsum + L;
			L++;
		} Lsum = Lsum + L Lsum Lsum + L Lsum L L++ L Lsum = Lsum - Ltemp Lsum Lsum - Ltemp Lsum Ltemp System.out.println(Lsum) System.out.println System.out System System.out Lsum String args[] args public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);


	//List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int L = std.nextInt();
	int Lsum = 0;
	int Ltemp = L;
	//String S = std.next();

	if(L <= 0 && Math.abs(L) < N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum +L;
			L++;
		}
	}


	else if(L <= 0 && Math.abs(L) >= N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - L + 1;
	}

//-5,-4,-3=-12.
	else {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - Ltemp;
	}

	System.out.println(Lsum);


	  }


	} public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);


	//List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int L = std.nextInt();
	int Lsum = 0;
	int Ltemp = L;
	//String S = std.next();

	if(L <= 0 && Math.abs(L) < N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum +L;
			L++;
		}
	}


	else if(L <= 0 && Math.abs(L) >= N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - L + 1;
	}

//-5,-4,-3=-12.
	else {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - Ltemp;
	}

	System.out.println(Lsum);


	  }


	} Main
import java.util.Scanner;

public class Main {
	public static void main(String args[]) {

	Scanner std = new Scanner(System.in);


	//List<Integer> list = new ArrayList<>();
	int N = std.nextInt();
	int L = std.nextInt();
	int Lsum = 0;
	int Ltemp = L;
	//String S = std.next();

	if(L <= 0 && Math.abs(L) < N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum +L;
			L++;
		}
	}


	else if(L <= 0 && Math.abs(L) >= N) {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - L + 1;
	}

//-5,-4,-3=-12.
	else {
		for(int i = 0; i < N; i++) {
			Lsum = Lsum + L;
			L++;
		}
		Lsum = Lsum - Ltemp;
	}

	System.out.println(Lsum);


	  }


	}


