import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int[] taste = new int[n];
    int sum = 0;
    int abs_min = 512;
    int abs_min_index = 512;

    for(int i=0; i<n; ++i) {
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
      if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      }
    }

    sum -= taste[abs_min_index];
    System.out.println(sum);
  }
} import java.util.Scanner; Scanner 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[] taste = new int[n];
    int sum = 0;
    int abs_min = 512;
    int abs_min_index = 512;

    for(int i=0; i<n; ++i) {
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
      if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      }
    }

    sum -= taste[abs_min_index];
    System.out.println(sum);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int[] taste = new int[n];
    int sum = 0;
    int abs_min = 512;
    int abs_min_index = 512;

    for(int i=0; i<n; ++i) {
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
      if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      }
    }

    sum -= taste[abs_min_index];
    System.out.println(sum);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int[] taste = new int[n];
    int sum = 0;
    int abs_min = 512;
    int abs_min_index = 512;

    for(int i=0; i<n; ++i) {
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
      if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      }
    }

    sum -= taste[abs_min_index];
    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[] taste = new int[n]; taste new int[n] n int sum = 0; sum 0 int abs_min = 512; abs_min 512 int abs_min_index = 512; abs_min_index 512 for(int i=0; i<n; ++i) {
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
      if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      }
    } int i=0; int i=0; i 0 i<n i n ++i ++i i {
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
      if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      }
    } {
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
      if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      }
    } taste[i] = l + (i+1) - 1 taste[i] taste i l + (i+1) - 1 l + (i+1) l (i+1) i 1 1 sum += taste[i] sum taste[i] taste i if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      } Math.abs(taste[i]) < abs_min Math.abs(taste[i]) Math.abs Math taste[i] taste i abs_min {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      } abs_min = Math.abs(taste[i]) abs_min Math.abs(taste[i]) Math.abs Math taste[i] taste i abs_min_index = i abs_min_index i sum -= taste[abs_min_index] sum taste[abs_min_index] taste abs_min_index System.out.println(sum) System.out.println System.out System System.out sum 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[] taste = new int[n];
    int sum = 0;
    int abs_min = 512;
    int abs_min_index = 512;

    for(int i=0; i<n; ++i) {
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
      if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      }
    }

    sum -= taste[abs_min_index];
    System.out.println(sum);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int[] taste = new int[n];
    int sum = 0;
    int abs_min = 512;
    int abs_min_index = 512;

    for(int i=0; i<n; ++i) {
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
      if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      }
    }

    sum -= taste[abs_min_index];
    System.out.println(sum);
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int[] taste = new int[n];
    int sum = 0;
    int abs_min = 512;
    int abs_min_index = 512;

    for(int i=0; i<n; ++i) {
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
      if( Math.abs(taste[i]) < abs_min ) {
        abs_min = Math.abs(taste[i]);
        abs_min_index = i;
      }
    }

    sum -= taste[abs_min_index];
    System.out.println(sum);
  }
}