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;
    if(aji(l,1)*aji(l,n)>0){
        sum -= aji(l,1)>0 ? aji(l,1) : aji(l,n) ;
    }
    for(int i=1;i<=n;i++){
        sum+=aji(l,i);
    }
    System.out.println(sum);
  }
  static int aji(int l,int i){
      return l+i-1;
  }
} 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;
    if(aji(l,1)*aji(l,n)>0){
        sum -= aji(l,1)>0 ? aji(l,1) : aji(l,n) ;
    }
    for(int i=1;i<=n;i++){
        sum+=aji(l,i);
    }
    System.out.println(sum);
  }
  static int aji(int l,int i){
      return l+i-1;
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt();
    int l=sc.nextInt();
    int sum=0;
    if(aji(l,1)*aji(l,n)>0){
        sum -= aji(l,1)>0 ? aji(l,1) : aji(l,n) ;
    }
    for(int i=1;i<=n;i++){
        sum+=aji(l,i);
    }
    System.out.println(sum);
  } main {
    Scanner sc = new Scanner(System.in);
    int n=sc.nextInt();
    int l=sc.nextInt();
    int sum=0;
    if(aji(l,1)*aji(l,n)>0){
        sum -= aji(l,1)>0 ? aji(l,1) : aji(l,n) ;
    }
    for(int i=1;i<=n;i++){
        sum+=aji(l,i);
    }
    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 if(aji(l,1)*aji(l,n)>0){
        sum -= aji(l,1)>0 ? aji(l,1) : aji(l,n) ;
    } aji(l,1)*aji(l,n)>0 aji(l,1)*aji(l,n) aji(l,1) aji l 1 aji(l,n) aji l n 0 {
        sum -= aji(l,1)>0 ? aji(l,1) : aji(l,n) ;
    } sum -= aji(l,1)>0 ? aji(l,1) : aji(l,n) sum aji(l,1)>0 ? aji(l,1) : aji(l,n) aji(l,1)>0 aji(l,1) aji l 1 0 aji(l,1) aji l 1 aji(l,n) aji l n for(int i=1;i<=n;i++){
        sum+=aji(l,i);
    } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
        sum+=aji(l,i);
    } {
        sum+=aji(l,i);
    } sum+=aji(l,i) sum aji(l,i) aji l i System.out.println(sum) System.out.println System.out System System.out sum String[] args args static int aji(int l,int i){
      return l+i-1;
  } aji {
      return l+i-1;
  } return l+i-1; l+i-1 l+i l i 1 int l l int i i 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;
    if(aji(l,1)*aji(l,n)>0){
        sum -= aji(l,1)>0 ? aji(l,1) : aji(l,n) ;
    }
    for(int i=1;i<=n;i++){
        sum+=aji(l,i);
    }
    System.out.println(sum);
  }
  static int aji(int l,int i){
      return l+i-1;
  }
} 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;
    if(aji(l,1)*aji(l,n)>0){
        sum -= aji(l,1)>0 ? aji(l,1) : aji(l,n) ;
    }
    for(int i=1;i<=n;i++){
        sum+=aji(l,i);
    }
    System.out.println(sum);
  }
  static int aji(int l,int i){
      return l+i-1;
  }
} 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;
    if(aji(l,1)*aji(l,n)>0){
        sum -= aji(l,1)>0 ? aji(l,1) : aji(l,n) ;
    }
    for(int i=1;i<=n;i++){
        sum+=aji(l,i);
    }
    System.out.println(sum);
  }
  static int aji(int l,int i){
      return l+i-1;
  }
}
