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 total = 0;
    int a[] = new int[n];
    int x[] = new int[n];
    int min = 0;
    for(int i=0 ; i<n ; i++){
      a[i] = i+l;
      total = total + a[i];
    }
    for(int i=0 ; i<n ; i++){
      if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      }
    }
    System.out.println(total-a[min]);
  }
} 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 total = 0;
    int a[] = new int[n];
    int x[] = new int[n];
    int min = 0;
    for(int i=0 ; i<n ; i++){
      a[i] = i+l;
      total = total + a[i];
    }
    for(int i=0 ; i<n ; i++){
      if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      }
    }
    System.out.println(total-a[min]);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int total = 0;
    int a[] = new int[n];
    int x[] = new int[n];
    int min = 0;
    for(int i=0 ; i<n ; i++){
      a[i] = i+l;
      total = total + a[i];
    }
    for(int i=0 ; i<n ; i++){
      if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      }
    }
    System.out.println(total-a[min]);
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int total = 0;
    int a[] = new int[n];
    int x[] = new int[n];
    int min = 0;
    for(int i=0 ; i<n ; i++){
      a[i] = i+l;
      total = total + a[i];
    }
    for(int i=0 ; i<n ; i++){
      if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      }
    }
    System.out.println(total-a[min]);
  } 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 total = 0; total 0 int a[] = new int[n]; a new int[n] n int x[] = new int[n]; x new int[n] n int min = 0; min 0 for(int i=0 ; i<n ; i++){
      a[i] = i+l;
      total = total + a[i];
    } int i=0 ; int i=0 ; i 0 i<n i n i++ i++ i {
      a[i] = i+l;
      total = total + a[i];
    } {
      a[i] = i+l;
      total = total + a[i];
    } a[i] = i+l a[i] a i i+l i l total = total + a[i] total total + a[i] total a[i] a i for(int i=0 ; i<n ; i++){
      if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      }
    } int i=0 ; int i=0 ; i 0 i<n i n i++ i++ i {
      if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      }
    } {
      if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      }
    } if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      } Math.abs(a[i])<=Math.abs(a[min]) Math.abs(a[i]) Math.abs Math a[i] a i Math.abs(a[min]) Math.abs Math a[min] a min {
        min = i;
      } min = i min i System.out.println(total-a[min]) System.out.println System.out System System.out total-a[min] total a[min] a min 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 total = 0;
    int a[] = new int[n];
    int x[] = new int[n];
    int min = 0;
    for(int i=0 ; i<n ; i++){
      a[i] = i+l;
      total = total + a[i];
    }
    for(int i=0 ; i<n ; i++){
      if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      }
    }
    System.out.println(total-a[min]);
  }
} public class Main{
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int total = 0;
    int a[] = new int[n];
    int x[] = new int[n];
    int min = 0;
    for(int i=0 ; i<n ; i++){
      a[i] = i+l;
      total = total + a[i];
    }
    for(int i=0 ; i<n ; i++){
      if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      }
    }
    System.out.println(total-a[min]);
  }
} 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 total = 0;
    int a[] = new int[n];
    int x[] = new int[n];
    int min = 0;
    for(int i=0 ; i<n ; i++){
      a[i] = i+l;
      total = total + a[i];
    }
    for(int i=0 ; i<n ; i++){
      if(Math.abs(a[i])<=Math.abs(a[min])){
        min = i;
      }
    }
    System.out.println(total-a[min]);
  }
}
