import java.io.FileNotFoundException;
import java.util.Scanner;

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

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();


		int sum = N*(2*L+N-1)/2;

		if(L+N-1<0) {
			System.out.println(sum-(L+N-1));
		} else {
			if(L>0) {
				System.out.println(sum-L);
			} else {
				System.out.println(sum);
			}
		}
	}
} import java.io.FileNotFoundException; FileNotFoundException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();


		int sum = N*(2*L+N-1)/2;

		if(L+N-1<0) {
			System.out.println(sum-(L+N-1));
		} else {
			if(L>0) {
				System.out.println(sum-L);
			} else {
				System.out.println(sum);
			}
		}
	}
} Main public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();


		int sum = N*(2*L+N-1)/2;

		if(L+N-1<0) {
			System.out.println(sum-(L+N-1));
		} else {
			if(L>0) {
				System.out.println(sum-L);
			} else {
				System.out.println(sum);
			}
		}
	} main {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();


		int sum = N*(2*L+N-1)/2;

		if(L+N-1<0) {
			System.out.println(sum-(L+N-1));
		} else {
			if(L>0) {
				System.out.println(sum-L);
			} else {
				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+N-1<0) {
			System.out.println(sum-(L+N-1));
		} else {
			if(L>0) {
				System.out.println(sum-L);
			} else {
				System.out.println(sum);
			}
		} L+N-1<0 L+N-1 L+N L N 1 0 {
			System.out.println(sum-(L+N-1));
		} System.out.println(sum-(L+N-1)) System.out.println System.out System System.out sum-(L+N-1) sum (L+N-1) L+N L N 1 {
			if(L>0) {
				System.out.println(sum-L);
			} else {
				System.out.println(sum);
			}
		} if(L>0) {
				System.out.println(sum-L);
			} else {
				System.out.println(sum);
			} L>0 L 0 {
				System.out.println(sum-L);
			} System.out.println(sum-L) System.out.println System.out System System.out sum-L sum L {
				System.out.println(sum);
			} 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) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();


		int sum = N*(2*L+N-1)/2;

		if(L+N-1<0) {
			System.out.println(sum-(L+N-1));
		} else {
			if(L>0) {
				System.out.println(sum-L);
			} else {
				System.out.println(sum);
			}
		}
	}
} public class Main {
	public static void main(String[] args) throws FileNotFoundException {

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();


		int sum = N*(2*L+N-1)/2;

		if(L+N-1<0) {
			System.out.println(sum-(L+N-1));
		} else {
			if(L>0) {
				System.out.println(sum-L);
			} else {
				System.out.println(sum);
			}
		}
	}
} Main
import java.io.FileNotFoundException;
import java.util.Scanner;

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

		//    	File file = new File("src/in.txt");
		//    	Scanner sc = new Scanner(file);

		Scanner sc = new Scanner(System.in);

		int N = sc.nextInt();
		int L = sc.nextInt();


		int sum = N*(2*L+N-1)/2;

		if(L+N-1<0) {
			System.out.println(sum-(L+N-1));
		} else {
			if(L>0) {
				System.out.println(sum-L);
			} else {
				System.out.println(sum);
			}
		}
	}
}