import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
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();
		List<Integer> azi = new ArrayList<Integer>();
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			azi.add(L + i - 1);
		}

		Collections.sort(azi);

		if (azi.contains(0) && L != 0) {
			for (int i = 0; i < N; i++) {
				answer += azi.get(i);
			}
		} else if (azi.get(azi.size() - 1) < 0) {
			for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			}
		} else {
			for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			}
		}
		System.out.println(answer);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List java.util 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();
		List<Integer> azi = new ArrayList<Integer>();
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			azi.add(L + i - 1);
		}

		Collections.sort(azi);

		if (azi.contains(0) && L != 0) {
			for (int i = 0; i < N; i++) {
				answer += azi.get(i);
			}
		} else if (azi.get(azi.size() - 1) < 0) {
			for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			}
		} else {
			for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			}
		}
		System.out.println(answer);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		List<Integer> azi = new ArrayList<Integer>();
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			azi.add(L + i - 1);
		}

		Collections.sort(azi);

		if (azi.contains(0) && L != 0) {
			for (int i = 0; i < N; i++) {
				answer += azi.get(i);
			}
		} else if (azi.get(azi.size() - 1) < 0) {
			for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			}
		} else {
			for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			}
		}
		System.out.println(answer);
	} main {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		List<Integer> azi = new ArrayList<Integer>();
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			azi.add(L + i - 1);
		}

		Collections.sort(azi);

		if (azi.contains(0) && L != 0) {
			for (int i = 0; i < N; i++) {
				answer += azi.get(i);
			}
		} else if (azi.get(azi.size() - 1) < 0) {
			for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			}
		} else {
			for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			}
		}
		System.out.println(answer);
	} 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 List<Integer> azi = new ArrayList<Integer>(); azi new ArrayList<Integer>() int answer = 0; answer 0 for (int i = 1; i <= N; i++) {
			azi.add(L + i - 1);
		} int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
			azi.add(L + i - 1);
		} {
			azi.add(L + i - 1);
		} azi.add(L + i - 1) azi.add azi L + i - 1 L + i L i 1 Collections.sort(azi) Collections.sort Collections azi if (azi.contains(0) && L != 0) {
			for (int i = 0; i < N; i++) {
				answer += azi.get(i);
			}
		} else if (azi.get(azi.size() - 1) < 0) {
			for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			}
		} else {
			for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			}
		} azi.contains(0) && L != 0 azi.contains(0) azi.contains azi 0 L != 0 L 0 {
			for (int i = 0; i < N; i++) {
				answer += azi.get(i);
			}
		} for (int i = 0; i < N; i++) {
				answer += azi.get(i);
			} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
				answer += azi.get(i);
			} {
				answer += azi.get(i);
			} answer += azi.get(i) answer azi.get(i) azi.get azi i if (azi.get(azi.size() - 1) < 0) {
			for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			}
		} else {
			for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			}
		} azi.get(azi.size() - 1) < 0 azi.get(azi.size() - 1) azi.get azi azi.size() - 1 azi.size() azi.size azi 1 0 {
			for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			}
		} for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			} int i = 0; int i = 0; i 0 i < N - 1 i N - 1 N 1 i++ i++ i {
				answer += azi.get(i);
			} {
				answer += azi.get(i);
			} answer += azi.get(i) answer azi.get(i) azi.get azi i {
			for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			}
		} for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			} int i = 1; int i = 1; i 1 i < N i N i++ i++ i {
				answer += azi.get(i);
			} {
				answer += azi.get(i);
			} answer += azi.get(i) answer azi.get(i) azi.get azi i System.out.println(answer) System.out.println System.out System System.out answer 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();
		List<Integer> azi = new ArrayList<Integer>();
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			azi.add(L + i - 1);
		}

		Collections.sort(azi);

		if (azi.contains(0) && L != 0) {
			for (int i = 0; i < N; i++) {
				answer += azi.get(i);
			}
		} else if (azi.get(azi.size() - 1) < 0) {
			for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			}
		} else {
			for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			}
		}
		System.out.println(answer);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int L = sc.nextInt();
		List<Integer> azi = new ArrayList<Integer>();
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			azi.add(L + i - 1);
		}

		Collections.sort(azi);

		if (azi.contains(0) && L != 0) {
			for (int i = 0; i < N; i++) {
				answer += azi.get(i);
			}
		} else if (azi.get(azi.size() - 1) < 0) {
			for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			}
		} else {
			for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			}
		}
		System.out.println(answer);
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
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();
		List<Integer> azi = new ArrayList<Integer>();
		int answer = 0;

		for (int i = 1; i <= N; i++) {
			azi.add(L + i - 1);
		}

		Collections.sort(azi);

		if (azi.contains(0) && L != 0) {
			for (int i = 0; i < N; i++) {
				answer += azi.get(i);
			}
		} else if (azi.get(azi.size() - 1) < 0) {
			for (int i = 0; i < N - 1; i++) {
				answer += azi.get(i);
			}
		} else {
			for (int i = 1; i < N; i++) {
				answer += azi.get(i);
			}
		}
		System.out.println(answer);
	}
}
