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 s = 0;
		int b = 1000;
		sc.close();
		for(int i=1; i<=N; i++) {
			int c = L + i -1;
			if(Math.abs(c)<Math.abs(b)) {
				b = c;
			}
		}
		for(int i=1; i<=N; i++) {
			s += L + i -1;
		}
		s -= b;
		System.out.println(s);
	}

} 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 s = 0;
		int b = 1000;
		sc.close();
		for(int i=1; i<=N; i++) {
			int c = L + i -1;
			if(Math.abs(c)<Math.abs(b)) {
				b = c;
			}
		}
		for(int i=1; i<=N; i++) {
			s += L + i -1;
		}
		s -= b;
		System.out.println(s);
	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int s = 0;
		int b = 1000;
		sc.close();
		for(int i=1; i<=N; i++) {
			int c = L + i -1;
			if(Math.abs(c)<Math.abs(b)) {
				b = c;
			}
		}
		for(int i=1; i<=N; i++) {
			s += L + i -1;
		}
		s -= b;
		System.out.println(s);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int s = 0;
		int b = 1000;
		sc.close();
		for(int i=1; i<=N; i++) {
			int c = L + i -1;
			if(Math.abs(c)<Math.abs(b)) {
				b = c;
			}
		}
		for(int i=1; i<=N; i++) {
			s += L + i -1;
		}
		s -= b;
		System.out.println(s);
	} 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 s = 0; s 0 int b = 1000; b 1000 sc.close() sc.close sc for(int i=1; i<=N; i++) {
			int c = L + i -1;
			if(Math.abs(c)<Math.abs(b)) {
				b = c;
			}
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			int c = L + i -1;
			if(Math.abs(c)<Math.abs(b)) {
				b = c;
			}
		} {
			int c = L + i -1;
			if(Math.abs(c)<Math.abs(b)) {
				b = c;
			}
		} int c = L + i -1; c L + i -1 L + i L i 1 if(Math.abs(c)<Math.abs(b)) {
				b = c;
			} Math.abs(c)<Math.abs(b) Math.abs(c) Math.abs Math c Math.abs(b) Math.abs Math b {
				b = c;
			} b = c b c for(int i=1; i<=N; i++) {
			s += L + i -1;
		} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
			s += L + i -1;
		} {
			s += L + i -1;
		} s += L + i -1 s L + i -1 L + i L i 1 s -= b s b System.out.println(s) System.out.println System.out System System.out s 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 s = 0;
		int b = 1000;
		sc.close();
		for(int i=1; i<=N; i++) {
			int c = L + i -1;
			if(Math.abs(c)<Math.abs(b)) {
				b = c;
			}
		}
		for(int i=1; i<=N; i++) {
			s += L + i -1;
		}
		s -= b;
		System.out.println(s);
	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		int s = 0;
		int b = 1000;
		sc.close();
		for(int i=1; i<=N; i++) {
			int c = L + i -1;
			if(Math.abs(c)<Math.abs(b)) {
				b = c;
			}
		}
		for(int i=1; i<=N; i++) {
			s += L + i -1;
		}
		s -= b;
		System.out.println(s);
	}

} 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 s = 0;
		int b = 1000;
		sc.close();
		for(int i=1; i<=N; i++) {
			int c = L + i -1;
			if(Math.abs(c)<Math.abs(b)) {
				b = c;
			}
		}
		for(int i=1; i<=N; i++) {
			s += L + i -1;
		}
		s -= b;
		System.out.println(s);
	}

}