
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int l = sc.nextInt();
		
		int sum = n*(2*l + n - 1)/2;
		
		if(l >= 0) {
			sum -= l;
		}
		else if(l <= -n) {
			sum -= l + n - 1;
		}
		
		System.out.println(sum);
	}

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

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int l = sc.nextInt();
		
		int sum = n*(2*l + n - 1)/2;
		
		if(l >= 0) {
			sum -= l;
		}
		else if(l <= -n) {
			sum -= l + n - 1;
		}
		
		System.out.println(sum);
	}

} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int l = sc.nextInt();
		
		int sum = n*(2*l + n - 1)/2;
		
		if(l >= 0) {
			sum -= l;
		}
		else if(l <= -n) {
			sum -= l + n - 1;
		}
		
		System.out.println(sum);
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int l = sc.nextInt();
		
		int sum = n*(2*l + n - 1)/2;
		
		if(l >= 0) {
			sum -= l;
		}
		else if(l <= -n) {
			sum -= l + n - 1;
		}
		
		System.out.println(sum);
	} 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 = n*(2*l + n - 1)/2; sum n*(2*l + n - 1)/2 n*(2*l + n - 1) n (2*l + n - 1) 2*l + n 2*l 2 l n 1 2 if(l >= 0) {
			sum -= l;
		}
		else if(l <= -n) {
			sum -= l + n - 1;
		} l >= 0 l 0 {
			sum -= l;
		} sum -= l sum l if(l <= -n) {
			sum -= l + n - 1;
		} l <= -n l -n n {
			sum -= l + n - 1;
		} sum -= l + n - 1 sum l + n - 1 l + n l n 1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int l = sc.nextInt();
		
		int sum = n*(2*l + n - 1)/2;
		
		if(l >= 0) {
			sum -= l;
		}
		else if(l <= -n) {
			sum -= l + n - 1;
		}
		
		System.out.println(sum);
	}

} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int l = sc.nextInt();
		
		int sum = n*(2*l + n - 1)/2;
		
		if(l >= 0) {
			sum -= l;
		}
		else if(l <= -n) {
			sum -= l + n - 1;
		}
		
		System.out.println(sum);
	}

} Main

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int n = sc.nextInt();
		int l = sc.nextInt();
		
		int sum = n*(2*l + n - 1)/2;
		
		if(l >= 0) {
			sum -= l;
		}
		else if(l <= -n) {
			sum -= l + n - 1;
		}
		
		System.out.println(sum);
	}

}
