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 abs = 2000;
    int total = 0;
    int p = -1;
    for(int i = 0;i<n;i++){
      aji[i] = l + i;
      total += aji[i];
      if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      }
    }
    System.out.println(total-aji[p]);
  }
} 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 abs = 2000;
    int total = 0;
    int p = -1;
    for(int i = 0;i<n;i++){
      aji[i] = l + i;
      total += aji[i];
      if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      }
    }
    System.out.println(total-aji[p]);
  }
} 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 abs = 2000;
    int total = 0;
    int p = -1;
    for(int i = 0;i<n;i++){
      aji[i] = l + i;
      total += aji[i];
      if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      }
    }
    System.out.println(total-aji[p]);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int[] aji = new int[n];
    int abs = 2000;
    int total = 0;
    int p = -1;
    for(int i = 0;i<n;i++){
      aji[i] = l + i;
      total += aji[i];
      if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      }
    }
    System.out.println(total-aji[p]);
  } 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 abs = 2000; abs 2000 int total = 0; total 0 int p = -1; p -1 1 for(int i = 0;i<n;i++){
      aji[i] = l + i;
      total += aji[i];
      if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      }
    } int i = 0; int i = 0; i 0 i<n i n i++ i++ i {
      aji[i] = l + i;
      total += aji[i];
      if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      }
    } {
      aji[i] = l + i;
      total += aji[i];
      if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      }
    } aji[i] = l + i aji[i] aji i l + i l i total += aji[i] total aji[i] aji i if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      } abs>Math.abs(aji[i]) abs Math.abs(aji[i]) Math.abs Math aji[i] aji i {
        p = i;
        abs = Math.abs(aji[i]);
      } p = i p i abs = Math.abs(aji[i]) abs Math.abs(aji[i]) Math.abs Math aji[i] aji i System.out.println(total-aji[p]) System.out.println System.out System System.out total-aji[p] total aji[p] aji p 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 abs = 2000;
    int total = 0;
    int p = -1;
    for(int i = 0;i<n;i++){
      aji[i] = l + i;
      total += aji[i];
      if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      }
    }
    System.out.println(total-aji[p]);
  }
} 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 abs = 2000;
    int total = 0;
    int p = -1;
    for(int i = 0;i<n;i++){
      aji[i] = l + i;
      total += aji[i];
      if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      }
    }
    System.out.println(total-aji[p]);
  }
} 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 abs = 2000;
    int total = 0;
    int p = -1;
    for(int i = 0;i<n;i++){
      aji[i] = l + i;
      total += aji[i];
      if(abs>Math.abs(aji[i])){
        p = i;
        abs = Math.abs(aji[i]);
      }
    }
    System.out.println(total-aji[p]);
  }
}
