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[] taste = new int[n];
    
    int sum = 0;
    int min = 0;
    for(int i = 0; i < n; i++){
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
    }
    
    int data = 0;
    int t = 300;
    int near = 0;
    for(int i = 0; i < n; i++){
      data = taste[i];
      int target = Math.abs(data - min);
      if(t > target){
        t = target;
        near = data;
      }
    }
   
    System.out.println(sum - near);
    
  }
} 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[] taste = new int[n];
    
    int sum = 0;
    int min = 0;
    for(int i = 0; i < n; i++){
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
    }
    
    int data = 0;
    int t = 300;
    int near = 0;
    for(int i = 0; i < n; i++){
      data = taste[i];
      int target = Math.abs(data - min);
      if(t > target){
        t = target;
        near = data;
      }
    }
   
    System.out.println(sum - near);
    
  }
} 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 min = 0;
    for(int i = 0; i < n; i++){
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
    }
    
    int data = 0;
    int t = 300;
    int near = 0;
    for(int i = 0; i < n; i++){
      data = taste[i];
      int target = Math.abs(data - min);
      if(t > target){
        t = target;
        near = data;
      }
    }
   
    System.out.println(sum - near);
    
  } main {
    
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int[] taste = new int[n];
    
    int sum = 0;
    int min = 0;
    for(int i = 0; i < n; i++){
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
    }
    
    int data = 0;
    int t = 300;
    int near = 0;
    for(int i = 0; i < n; i++){
      data = taste[i];
      int target = Math.abs(data - min);
      if(t > target){
        t = target;
        near = data;
      }
    }
   
    System.out.println(sum - near);
    
  } 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 min = 0; min 0 for(int i = 0; i < n; i++){
      taste[i] = l + (i+1) - 1;
      sum += taste[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];
    } {
      taste[i] = l + (i+1) - 1;
      sum += taste[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 int data = 0; data 0 int t = 300; t 300 int near = 0; near 0 for(int i = 0; i < n; i++){
      data = taste[i];
      int target = Math.abs(data - min);
      if(t > target){
        t = target;
        near = data;
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      data = taste[i];
      int target = Math.abs(data - min);
      if(t > target){
        t = target;
        near = data;
      }
    } {
      data = taste[i];
      int target = Math.abs(data - min);
      if(t > target){
        t = target;
        near = data;
      }
    } data = taste[i] data taste[i] taste i int target = Math.abs(data - min); target Math.abs(data - min) Math.abs Math data - min data min if(t > target){
        t = target;
        near = data;
      } t > target t target {
        t = target;
        near = data;
      } t = target t target near = data near data System.out.println(sum - near) System.out.println System.out System System.out sum - near sum near 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 min = 0;
    for(int i = 0; i < n; i++){
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
    }
    
    int data = 0;
    int t = 300;
    int near = 0;
    for(int i = 0; i < n; i++){
      data = taste[i];
      int target = Math.abs(data - min);
      if(t > target){
        t = target;
        near = data;
      }
    }
   
    System.out.println(sum - near);
    
  }
} 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 min = 0;
    for(int i = 0; i < n; i++){
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
    }
    
    int data = 0;
    int t = 300;
    int near = 0;
    for(int i = 0; i < n; i++){
      data = taste[i];
      int target = Math.abs(data - min);
      if(t > target){
        t = target;
        near = data;
      }
    }
   
    System.out.println(sum - near);
    
  }
} 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[] taste = new int[n];
    
    int sum = 0;
    int min = 0;
    for(int i = 0; i < n; i++){
      taste[i] = l + (i+1) - 1;
      sum += taste[i];
    }
    
    int data = 0;
    int t = 300;
    int near = 0;
    for(int i = 0; i < n; i++){
      data = taste[i];
      int target = Math.abs(data - min);
      if(t > target){
        t = target;
        near = data;
      }
    }
   
    System.out.println(sum - near);
    
  }
}