import 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 sum=0;
      for(int i=1;i<N+1;i++){
        sum+=i+L-1;
      }
      if(L>=0){
      sum-=L;
      }else if(N>Math.abs(L)){
        sum=sum;
      }else{
      sum+=Math.abs(N+L-1);
      }
      System.out.println(sum);
	}
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int L=sc.nextInt();
      int sum=0;
      for(int i=1;i<N+1;i++){
        sum+=i+L-1;
      }
      if(L>=0){
      sum-=L;
      }else if(N>Math.abs(L)){
        sum=sum;
      }else{
      sum+=Math.abs(N+L-1);
      }
      System.out.println(sum);
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int L=sc.nextInt();
      int sum=0;
      for(int i=1;i<N+1;i++){
        sum+=i+L-1;
      }
      if(L>=0){
      sum-=L;
      }else if(N>Math.abs(L)){
        sum=sum;
      }else{
      sum+=Math.abs(N+L-1);
      }
      System.out.println(sum);
	} main {
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int L=sc.nextInt();
      int sum=0;
      for(int i=1;i<N+1;i++){
        sum+=i+L-1;
      }
      if(L>=0){
      sum-=L;
      }else if(N>Math.abs(L)){
        sum=sum;
      }else{
      sum+=Math.abs(N+L-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=0; sum 0 for(int i=1;i<N+1;i++){
        sum+=i+L-1;
      } int i=1; int i=1; i 1 i<N+1 i N+1 N 1 i++ i++ i {
        sum+=i+L-1;
      } {
        sum+=i+L-1;
      } sum+=i+L-1 sum i+L-1 i+L i L 1 if(L>=0){
      sum-=L;
      }else if(N>Math.abs(L)){
        sum=sum;
      }else{
      sum+=Math.abs(N+L-1);
      } L>=0 L 0 {
      sum-=L;
      } sum-=L sum L if(N>Math.abs(L)){
        sum=sum;
      }else{
      sum+=Math.abs(N+L-1);
      } N>Math.abs(L) N Math.abs(L) Math.abs Math L {
        sum=sum;
      } sum=sum sum sum {
      sum+=Math.abs(N+L-1);
      } sum+=Math.abs(N+L-1) sum Math.abs(N+L-1) Math.abs Math N+L-1 N+L N L 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){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int L=sc.nextInt();
      int sum=0;
      for(int i=1;i<N+1;i++){
        sum+=i+L-1;
      }
      if(L>=0){
      sum-=L;
      }else if(N>Math.abs(L)){
        sum=sum;
      }else{
      sum+=Math.abs(N+L-1);
      }
      System.out.println(sum);
	}
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		// 整数の入力
		int N = sc.nextInt();
		int L=sc.nextInt();
      int sum=0;
      for(int i=1;i<N+1;i++){
        sum+=i+L-1;
      }
      if(L>=0){
      sum-=L;
      }else if(N>Math.abs(L)){
        sum=sum;
      }else{
      sum+=Math.abs(N+L-1);
      }
      System.out.println(sum);
	}
} Main
import 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 sum=0;
      for(int i=1;i<N+1;i++){
        sum+=i+L-1;
      }
      if(L>=0){
      sum-=L;
      }else if(N>Math.abs(L)){
        sum=sum;
      }else{
      sum+=Math.abs(N+L-1);
      }
      System.out.println(sum);
	}
}