import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      int l = Integer.parseInt(sc.next());
      int[] taste = new int[n];
      int sum = 0;
      for(int i=0;i<n;i++){
        taste[i] = l+i;
        sum+=taste[i];
      }
      int idx = -1;
      int min = 10000000;
      for(int i=0;i<n;i++){
        if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        }
      }
      System.out.print(sum-taste[idx]);
      System.out.flush();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      int l = Integer.parseInt(sc.next());
      int[] taste = new int[n];
      int sum = 0;
      for(int i=0;i<n;i++){
        taste[i] = l+i;
        sum+=taste[i];
      }
      int idx = -1;
      int min = 10000000;
      for(int i=0;i<n;i++){
        if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        }
      }
      System.out.print(sum-taste[idx]);
      System.out.flush();
    }
} Main public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      int l = Integer.parseInt(sc.next());
      int[] taste = new int[n];
      int sum = 0;
      for(int i=0;i<n;i++){
        taste[i] = l+i;
        sum+=taste[i];
      }
      int idx = -1;
      int min = 10000000;
      for(int i=0;i<n;i++){
        if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        }
      }
      System.out.print(sum-taste[idx]);
      System.out.flush();
    } main {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      int l = Integer.parseInt(sc.next());
      int[] taste = new int[n];
      int sum = 0;
      for(int i=0;i<n;i++){
        taste[i] = l+i;
        sum+=taste[i];
      }
      int idx = -1;
      int min = 10000000;
      for(int i=0;i<n;i++){
        if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        }
      }
      System.out.print(sum-taste[idx]);
      System.out.flush();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int l = Integer.parseInt(sc.next()); l Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int[] taste = new int[n]; taste new int[n] n int sum = 0; sum 0 for(int i=0;i<n;i++){
        taste[i] = l+i;
        sum+=taste[i];
      } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        taste[i] = l+i;
        sum+=taste[i];
      } {
        taste[i] = l+i;
        sum+=taste[i];
      } taste[i] = l+i taste[i] taste i l+i l i sum+=taste[i] sum taste[i] taste i int idx = -1; idx -1 1 int min = 10000000; min 10000000 for(int i=0;i<n;i++){
        if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        }
      } int i=0; int i=0; i 0 i<n i n i++ i++ i {
        if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        }
      } {
        if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        }
      } if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        } min > Math.abs(taste[i]) min Math.abs(taste[i]) Math.abs Math taste[i] taste i {
          idx = i;
          min = Math.abs(taste[i]);
        } idx = i idx i min = Math.abs(taste[i]) min Math.abs(taste[i]) Math.abs Math taste[i] taste i System.out.print(sum-taste[idx]) System.out.print System.out System System.out sum-taste[idx] sum taste[idx] taste idx System.out.flush() System.out.flush System.out System System.out String[] args args public class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      int l = Integer.parseInt(sc.next());
      int[] taste = new int[n];
      int sum = 0;
      for(int i=0;i<n;i++){
        taste[i] = l+i;
        sum+=taste[i];
      }
      int idx = -1;
      int min = 10000000;
      for(int i=0;i<n;i++){
        if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        }
      }
      System.out.print(sum-taste[idx]);
      System.out.flush();
    }
} public class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      int l = Integer.parseInt(sc.next());
      int[] taste = new int[n];
      int sum = 0;
      for(int i=0;i<n;i++){
        taste[i] = l+i;
        sum+=taste[i];
      }
      int idx = -1;
      int min = 10000000;
      for(int i=0;i<n;i++){
        if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        }
      }
      System.out.print(sum-taste[idx]);
      System.out.flush();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
      Scanner sc = new Scanner(System.in);
      int n = Integer.parseInt(sc.next());
      int l = Integer.parseInt(sc.next());
      int[] taste = new int[n];
      int sum = 0;
      for(int i=0;i<n;i++){
        taste[i] = l+i;
        sum+=taste[i];
      }
      int idx = -1;
      int min = 10000000;
      for(int i=0;i<n;i++){
        if(min > Math.abs(taste[i])){
          idx = i;
          min = Math.abs(taste[i]);
        }
      }
      System.out.print(sum-taste[idx]);
      System.out.flush();
    }
}