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[] Ls = new int[N];
    int min = 100; // Lの最大値
    int sum = 0;
    // 絶対値最小を検出
    for(int i=0; i<Ls.length; i++){
      Ls[i] = L + i;
      if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      }
      sum += Ls[i];
    }
    sum -= min;
    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[] Ls = new int[N];
    int min = 100; // Lの最大値
    int sum = 0;
    // 絶対値最小を検出
    for(int i=0; i<Ls.length; i++){
      Ls[i] = L + i;
      if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      }
      sum += Ls[i];
    }
    sum -= min;
    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[] Ls = new int[N];
    int min = 100; // Lの最大値
    int sum = 0;
    // 絶対値最小を検出
    for(int i=0; i<Ls.length; i++){
      Ls[i] = L + i;
      if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      }
      sum += Ls[i];
    }
    sum -= min;
    System.out.println(sum);
  } main {
    // 入力値の読み込み
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    int[] Ls = new int[N];
    int min = 100; // Lの最大値
    int sum = 0;
    // 絶対値最小を検出
    for(int i=0; i<Ls.length; i++){
      Ls[i] = L + i;
      if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      }
      sum += Ls[i];
    }
    sum -= min;
    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[] Ls = new int[N]; Ls new int[N] N int min = 100; min 100 int sum = 0; sum 0 for(int i=0; i<Ls.length; i++){
      Ls[i] = L + i;
      if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      }
      sum += Ls[i];
    } int i=0; int i=0; i 0 i<Ls.length i Ls.length Ls Ls.length i++ i++ i {
      Ls[i] = L + i;
      if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      }
      sum += Ls[i];
    } {
      Ls[i] = L + i;
      if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      }
      sum += Ls[i];
    } Ls[i] = L + i Ls[i] Ls i L + i L i if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      } Math.abs(Ls[i]) < Math.abs(min) Math.abs(Ls[i]) Math.abs Math Ls[i] Ls i Math.abs(min) Math.abs Math min {
        min = Ls[i];
      } min = Ls[i] min Ls[i] Ls i sum += Ls[i] sum Ls[i] Ls i sum -= min sum min 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[] Ls = new int[N];
    int min = 100; // Lの最大値
    int sum = 0;
    // 絶対値最小を検出
    for(int i=0; i<Ls.length; i++){
      Ls[i] = L + i;
      if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      }
      sum += Ls[i];
    }
    sum -= min;
    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[] Ls = new int[N];
    int min = 100; // Lの最大値
    int sum = 0;
    // 絶対値最小を検出
    for(int i=0; i<Ls.length; i++){
      Ls[i] = L + i;
      if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      }
      sum += Ls[i];
    }
    sum -= min;
    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[] Ls = new int[N];
    int min = 100; // Lの最大値
    int sum = 0;
    // 絶対値最小を検出
    for(int i=0; i<Ls.length; i++){
      Ls[i] = L + i;
      if(Math.abs(Ls[i]) < Math.abs(min)){
        min = Ls[i];
      }
      sum += Ls[i];
    }
    sum -= min;
    System.out.println(sum);
  }
}