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 s =Math.max(1-L,1);
    int t =Math.min(s,N);
    int x =0;
    for(int i=1;i<=N;i++){
      if(i==t){continue;}
      else{x=x+L-1+i;}}
    System.out.println(x);
  }
} 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 s =Math.max(1-L,1);
    int t =Math.min(s,N);
    int x =0;
    for(int i=1;i<=N;i++){
      if(i==t){continue;}
      else{x=x+L-1+i;}}
    System.out.println(x);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int  N =sc.nextInt();
    int L =sc.nextInt();
    int s =Math.max(1-L,1);
    int t =Math.min(s,N);
    int x =0;
    for(int i=1;i<=N;i++){
      if(i==t){continue;}
      else{x=x+L-1+i;}}
    System.out.println(x);
  } main {
    Scanner sc = new Scanner(System.in);
    int  N =sc.nextInt();
    int L =sc.nextInt();
    int s =Math.max(1-L,1);
    int t =Math.min(s,N);
    int x =0;
    for(int i=1;i<=N;i++){
      if(i==t){continue;}
      else{x=x+L-1+i;}}
    System.out.println(x);
  } 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 s =Math.max(1-L,1); s Math.max(1-L,1) Math.max Math 1-L 1 L 1 int t =Math.min(s,N); t Math.min(s,N) Math.min Math s N int x =0; x 0 for(int i=1;i<=N;i++){
      if(i==t){continue;}
      else{x=x+L-1+i;}} int i=1; int i=1; i 1 i<=N i N i++ i++ i {
      if(i==t){continue;}
      else{x=x+L-1+i;}} {
      if(i==t){continue;}
      else{x=x+L-1+i;}} if(i==t){continue;}
      else{x=x+L-1+i;} i==t i t {continue;} continue; {x=x+L-1+i;} x=x+L-1+i x x+L-1+i x+L-1 x+L x L 1 i System.out.println(x) System.out.println System.out System System.out x 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 s =Math.max(1-L,1);
    int t =Math.min(s,N);
    int x =0;
    for(int i=1;i<=N;i++){
      if(i==t){continue;}
      else{x=x+L-1+i;}}
    System.out.println(x);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int  N =sc.nextInt();
    int L =sc.nextInt();
    int s =Math.max(1-L,1);
    int t =Math.min(s,N);
    int x =0;
    for(int i=1;i<=N;i++){
      if(i==t){continue;}
      else{x=x+L-1+i;}}
    System.out.println(x);
  }
} 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 s =Math.max(1-L,1);
    int t =Math.min(s,N);
    int x =0;
    for(int i=1;i<=N;i++){
      if(i==t){continue;}
      else{x=x+L-1+i;}}
    System.out.println(x);
  }
}