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