import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),L=sc.nextInt();
		int min =100000;
		int sum=0;
		int eat=0;

		for(int i=1;i<=N;i++) {
			int tastes = L+i-1;
			sum+=tastes;
			if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			}
		}
		System.out.println(sum-eat);
	}
} 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(),L=sc.nextInt();
		int min =100000;
		int sum=0;
		int eat=0;

		for(int i=1;i<=N;i++) {
			int tastes = L+i-1;
			sum+=tastes;
			if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			}
		}
		System.out.println(sum-eat);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),L=sc.nextInt();
		int min =100000;
		int sum=0;
		int eat=0;

		for(int i=1;i<=N;i++) {
			int tastes = L+i-1;
			sum+=tastes;
			if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			}
		}
		System.out.println(sum-eat);
	} main {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),L=sc.nextInt();
		int min =100000;
		int sum=0;
		int eat=0;

		for(int i=1;i<=N;i++) {
			int tastes = L+i-1;
			sum+=tastes;
			if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			}
		}
		System.out.println(sum-eat);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N=sc.nextInt() N sc.nextInt() sc.nextInt sc L=sc.nextInt(); L sc.nextInt() sc.nextInt sc int min =100000; min 100000 int sum=0; sum 0 int eat=0; eat 0 for(int i=1;i<=N;i++) {
			int tastes = L+i-1;
			sum+=tastes;
			if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			}
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			int tastes = L+i-1;
			sum+=tastes;
			if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			}
		} {
			int tastes = L+i-1;
			sum+=tastes;
			if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			}
		} int tastes = L+i-1; tastes L+i-1 L+i L i 1 sum+=tastes sum tastes if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			} Math.abs(tastes)<min Math.abs(tastes) Math.abs Math tastes min {
				min=Math.abs(tastes);
				eat=tastes;
			} min=Math.abs(tastes) min Math.abs(tastes) Math.abs Math tastes eat=tastes eat tastes System.out.println(sum-eat) System.out.println System.out System System.out sum-eat sum eat String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),L=sc.nextInt();
		int min =100000;
		int sum=0;
		int eat=0;

		for(int i=1;i<=N;i++) {
			int tastes = L+i-1;
			sum+=tastes;
			if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			}
		}
		System.out.println(sum-eat);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),L=sc.nextInt();
		int min =100000;
		int sum=0;
		int eat=0;

		for(int i=1;i<=N;i++) {
			int tastes = L+i-1;
			sum+=tastes;
			if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			}
		}
		System.out.println(sum-eat);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N=sc.nextInt(),L=sc.nextInt();
		int min =100000;
		int sum=0;
		int eat=0;

		for(int i=1;i<=N;i++) {
			int tastes = L+i-1;
			sum+=tastes;
			if(Math.abs(tastes)<min) {
				min=Math.abs(tastes);
				eat=tastes;
			}
		}
		System.out.println(sum-eat);
	}
}
