import java.util.*;

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 data[] = new int[N];
    int sum = 0;
    int min = Integer.MAX_VALUE;
    for (int i=0; i<N; i++) {
      data[i] = L + i;
      sum += data[i];
      if (Math.abs(min) > Math.abs(data[i])) {
        min = data[i];
      }
    }
    System.out.println(sum - min);
  }
} import java.util.*; util.* java 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 data[] = new int[N];
    int sum = 0;
    int min = Integer.MAX_VALUE;
    for (int i=0; i<N; i++) {
      data[i] = L + i;
      sum += data[i];
      if (Math.abs(min) > Math.abs(data[i])) {
        min = data[i];
      }
    }
    System.out.println(sum - min);
  }
} 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 data[] = new int[N];
    int sum = 0;
    int min = Integer.MAX_VALUE;
    for (int i=0; i<N; i++) {
      data[i] = L + i;
      sum += data[i];
      if (Math.abs(min) > Math.abs(data[i])) {
        min = data[i];
      }
    }
    System.out.println(sum - min);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = Integer.parseInt(sc.next());
    int L = Integer.parseInt(sc.next());
    int data[] = new int[N];
    int sum = 0;
    int min = Integer.MAX_VALUE;
    for (int i=0; i<N; i++) {
      data[i] = L + i;
      sum += data[i];
      if (Math.abs(min) > Math.abs(data[i])) {
        min = data[i];
      }
    }
    System.out.println(sum - min);
  } 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 data[] = new int[N]; data new int[N] N int sum = 0; sum 0 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i=0; i<N; i++) {
      data[i] = L + i;
      sum += data[i];
      if (Math.abs(min) > Math.abs(data[i])) {
        min = data[i];
      }
    } int i=0; int i=0; i 0 i<N i N i++ i++ i {
      data[i] = L + i;
      sum += data[i];
      if (Math.abs(min) > Math.abs(data[i])) {
        min = data[i];
      }
    } {
      data[i] = L + i;
      sum += data[i];
      if (Math.abs(min) > Math.abs(data[i])) {
        min = data[i];
      }
    } data[i] = L + i data[i] data i L + i L i sum += data[i] sum data[i] data i if (Math.abs(min) > Math.abs(data[i])) {
        min = data[i];
      } Math.abs(min) > Math.abs(data[i]) Math.abs(min) Math.abs Math min Math.abs(data[i]) Math.abs Math data[i] data i {
        min = data[i];
      } min = data[i] min data[i] data i System.out.println(sum - min) System.out.println System.out System System.out sum - min sum min String[] args args
import java.util.*;

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 data[] = new int[N];
    int sum = 0;
    int min = Integer.MAX_VALUE;
    for (int i=0; i<N; i++) {
      data[i] = L + i;
      sum += data[i];
      if (Math.abs(min) > Math.abs(data[i])) {
        min = data[i];
      }
    }
    System.out.println(sum - min);
  }
}