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[] aji = new int[n];
    int ajisum = 0;
    for(int count = 0;count<n;count++){
      aji[count] = l+(count+1)-1;
      ajisum += aji[count];
    }
    int eat = 0;
    if(l<0){
      if(l+n<=0){
        eat = aji[n-1];
      }
    }else if(l>0){
      eat = aji[0];
    }
    System.out.println(ajisum-eat);
  } 
} 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[] aji = new int[n];
    int ajisum = 0;
    for(int count = 0;count<n;count++){
      aji[count] = l+(count+1)-1;
      ajisum += aji[count];
    }
    int eat = 0;
    if(l<0){
      if(l+n<=0){
        eat = aji[n-1];
      }
    }else if(l>0){
      eat = aji[0];
    }
    System.out.println(ajisum-eat);
  } 
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int[] aji = new int[n];
    int ajisum = 0;
    for(int count = 0;count<n;count++){
      aji[count] = l+(count+1)-1;
      ajisum += aji[count];
    }
    int eat = 0;
    if(l<0){
      if(l+n<=0){
        eat = aji[n-1];
      }
    }else if(l>0){
      eat = aji[0];
    }
    System.out.println(ajisum-eat);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int[] aji = new int[n];
    int ajisum = 0;
    for(int count = 0;count<n;count++){
      aji[count] = l+(count+1)-1;
      ajisum += aji[count];
    }
    int eat = 0;
    if(l<0){
      if(l+n<=0){
        eat = aji[n-1];
      }
    }else if(l>0){
      eat = aji[0];
    }
    System.out.println(ajisum-eat);
  } 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[] aji = new int[n]; aji new int[n] n int ajisum = 0; ajisum 0 for(int count = 0;count<n;count++){
      aji[count] = l+(count+1)-1;
      ajisum += aji[count];
    } int count = 0; int count = 0; count 0 count<n count n count++ count++ count {
      aji[count] = l+(count+1)-1;
      ajisum += aji[count];
    } {
      aji[count] = l+(count+1)-1;
      ajisum += aji[count];
    } aji[count] = l+(count+1)-1 aji[count] aji count l+(count+1)-1 l+(count+1) l (count+1) count 1 1 ajisum += aji[count] ajisum aji[count] aji count int eat = 0; eat 0 if(l<0){
      if(l+n<=0){
        eat = aji[n-1];
      }
    }else if(l>0){
      eat = aji[0];
    } l<0 l 0 {
      if(l+n<=0){
        eat = aji[n-1];
      }
    } if(l+n<=0){
        eat = aji[n-1];
      } l+n<=0 l+n l n 0 {
        eat = aji[n-1];
      } eat = aji[n-1] eat aji[n-1] aji n-1 n 1 if(l>0){
      eat = aji[0];
    } l>0 l 0 {
      eat = aji[0];
    } eat = aji[0] eat aji[0] aji 0 System.out.println(ajisum-eat) System.out.println System.out System System.out ajisum-eat ajisum eat 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[] aji = new int[n];
    int ajisum = 0;
    for(int count = 0;count<n;count++){
      aji[count] = l+(count+1)-1;
      ajisum += aji[count];
    }
    int eat = 0;
    if(l<0){
      if(l+n<=0){
        eat = aji[n-1];
      }
    }else if(l>0){
      eat = aji[0];
    }
    System.out.println(ajisum-eat);
  } 
} public class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int[] aji = new int[n];
    int ajisum = 0;
    for(int count = 0;count<n;count++){
      aji[count] = l+(count+1)-1;
      ajisum += aji[count];
    }
    int eat = 0;
    if(l<0){
      if(l+n<=0){
        eat = aji[n-1];
      }
    }else if(l>0){
      eat = aji[0];
    }
    System.out.println(ajisum-eat);
  } 
} 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[] aji = new int[n];
    int ajisum = 0;
    for(int count = 0;count<n;count++){
      aji[count] = l+(count+1)-1;
      ajisum += aji[count];
    }
    int eat = 0;
    if(l<0){
      if(l+n<=0){
        eat = aji[n-1];
      }
    }else if(l>0){
      eat = aji[0];
    }
    System.out.println(ajisum-eat);
  } 
}