import java.util.Scanner;

public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int sum = L*N-N+(1+N)*N/2;
		int absMin = Math.abs(L);
		int bite = L;
		for (int i=2;i<=N;i++) {
			if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			}
		}
		System.out.println(sum-bite);
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int sum = L*N-N+(1+N)*N/2;
		int absMin = Math.abs(L);
		int bite = L;
		for (int i=2;i<=N;i++) {
			if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			}
		}
		System.out.println(sum-bite);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int sum = L*N-N+(1+N)*N/2;
		int absMin = Math.abs(L);
		int bite = L;
		for (int i=2;i<=N;i++) {
			if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			}
		}
		System.out.println(sum-bite);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int sum = L*N-N+(1+N)*N/2;
		int absMin = Math.abs(L);
		int bite = L;
		for (int i=2;i<=N;i++) {
			if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			}
		}
		System.out.println(sum-bite);
	} 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 = L*N-N+(1+N)*N/2; sum L*N-N+(1+N)*N/2 L*N-N L*N L N N (1+N)*N/2 (1+N)*N (1+N) 1 N N 2 int absMin = Math.abs(L); absMin Math.abs(L) Math.abs Math L int bite = L; bite L for (int i=2;i<=N;i++) {
			if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			}
		} int i=2; int i=2; i 2 i<=N i N i++ i++ i {
			if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			}
		} {
			if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			}
		} if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			} Math.abs(L+i-1)<absMin Math.abs(L+i-1) Math.abs Math L+i-1 L+i L i 1 absMin {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			} absMin = Math.abs(L+i-1) absMin Math.abs(L+i-1) Math.abs Math L+i-1 L+i L i 1 bite = L+i-1 bite L+i-1 L+i L i 1 System.out.println(sum-bite) System.out.println System.out System System.out sum-bite sum bite String[] args args public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int sum = L*N-N+(1+N)*N/2;
		int absMin = Math.abs(L);
		int bite = L;
		for (int i=2;i<=N;i++) {
			if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			}
		}
		System.out.println(sum-bite);
	}
} public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int sum = L*N-N+(1+N)*N/2;
		int absMin = Math.abs(L);
		int bite = L;
		for (int i=2;i<=N;i++) {
			if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			}
		}
		System.out.println(sum-bite);
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int sum = L*N-N+(1+N)*N/2;
		int absMin = Math.abs(L);
		int bite = L;
		for (int i=2;i<=N;i++) {
			if (Math.abs(L+i-1)<absMin) {
				absMin = Math.abs(L+i-1);
				bite = L+i-1;
			}
		}
		System.out.println(sum-bite);
	}
}