import java.util.*;

class Main {
	  static int mod=1_000_000_007;
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
      long cnt =0;
      int flg=0;
      long N = sc.nextInt();
      long L = sc.nextInt();
      
      for(int i=0;i<N;i++) {
    	  cnt=cnt+L+i;
    	  if(L+i==0) {
    		  flg = 1;
    	  }
      }
      if (flg==0) {
    	  if(L<0) {
    		  cnt = cnt -(L+N-1);
    	  } else {
    		  cnt = cnt - (L);
    	  }
      }
      
      System.out.println(cnt);    	  
  }
 
} import java.util.*; util.* java class Main {
	  static int mod=1_000_000_007;
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
      long cnt =0;
      int flg=0;
      long N = sc.nextInt();
      long L = sc.nextInt();
      
      for(int i=0;i<N;i++) {
    	  cnt=cnt+L+i;
    	  if(L+i==0) {
    		  flg = 1;
    	  }
      }
      if (flg==0) {
    	  if(L<0) {
    		  cnt = cnt -(L+N-1);
    	  } else {
    		  cnt = cnt - (L);
    	  }
      }
      
      System.out.println(cnt);    	  
  }
 
} Main static int mod=1_000_000_007; mod 1_000_000_007 public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
      long cnt =0;
      int flg=0;
      long N = sc.nextInt();
      long L = sc.nextInt();
      
      for(int i=0;i<N;i++) {
    	  cnt=cnt+L+i;
    	  if(L+i==0) {
    		  flg = 1;
    	  }
      }
      if (flg==0) {
    	  if(L<0) {
    		  cnt = cnt -(L+N-1);
    	  } else {
    		  cnt = cnt - (L);
    	  }
      }
      
      System.out.println(cnt);    	  
  } main {
	  Scanner sc = new Scanner(System.in);
      long cnt =0;
      int flg=0;
      long N = sc.nextInt();
      long L = sc.nextInt();
      
      for(int i=0;i<N;i++) {
    	  cnt=cnt+L+i;
    	  if(L+i==0) {
    		  flg = 1;
    	  }
      }
      if (flg==0) {
    	  if(L<0) {
    		  cnt = cnt -(L+N-1);
    	  } else {
    		  cnt = cnt - (L);
    	  }
      }
      
      System.out.println(cnt);    	  
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long cnt =0; cnt 0 int flg=0; flg 0 long N = sc.nextInt(); N sc.nextInt() sc.nextInt sc long L = sc.nextInt(); L sc.nextInt() sc.nextInt sc for(int i=0;i<N;i++) {
    	  cnt=cnt+L+i;
    	  if(L+i==0) {
    		  flg = 1;
    	  }
      } int i=0; int i=0; i 0 i<N i N i++ i++ i {
    	  cnt=cnt+L+i;
    	  if(L+i==0) {
    		  flg = 1;
    	  }
      } {
    	  cnt=cnt+L+i;
    	  if(L+i==0) {
    		  flg = 1;
    	  }
      } cnt=cnt+L+i cnt cnt+L+i cnt+L+i cnt L i if(L+i==0) {
    		  flg = 1;
    	  } L+i==0 L+i L i 0 {
    		  flg = 1;
    	  } flg = 1 flg 1 if (flg==0) {
    	  if(L<0) {
    		  cnt = cnt -(L+N-1);
    	  } else {
    		  cnt = cnt - (L);
    	  }
      } flg==0 flg 0 {
    	  if(L<0) {
    		  cnt = cnt -(L+N-1);
    	  } else {
    		  cnt = cnt - (L);
    	  }
      } if(L<0) {
    		  cnt = cnt -(L+N-1);
    	  } else {
    		  cnt = cnt - (L);
    	  } L<0 L 0 {
    		  cnt = cnt -(L+N-1);
    	  } cnt = cnt -(L+N-1) cnt cnt -(L+N-1) cnt (L+N-1) L+N L N 1 {
    		  cnt = cnt - (L);
    	  } cnt = cnt - (L) cnt cnt - (L) cnt (L) System.out.println(cnt) System.out.println System.out System System.out cnt String[] args args
import java.util.*;

class Main {
	  static int mod=1_000_000_007;
  public static void main(String[] args) {
	  Scanner sc = new Scanner(System.in);
      long cnt =0;
      int flg=0;
      long N = sc.nextInt();
      long L = sc.nextInt();
      
      for(int i=0;i<N;i++) {
    	  cnt=cnt+L+i;
    	  if(L+i==0) {
    		  flg = 1;
    	  }
      }
      if (flg==0) {
    	  if(L<0) {
    		  cnt = cnt -(L+N-1);
    	  } else {
    		  cnt = cnt - (L);
    	  }
      }
      
      System.out.println(cnt);    	  
  }
 
}