import java.util.*;
import java.util.stream.*;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int L = in.nextInt();
    int min = Integer.MAX_VALUE;
    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += L + i;
      if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      }
    }
    System.out.println(sum - min);
  }
} import java.util.*; util.* java import java.util.stream.*; stream.* java.util public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int L = in.nextInt();
    int min = Integer.MAX_VALUE;
    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += L + i;
      if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      }
    }
    System.out.println(sum - min);
  }
} Main public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int L = in.nextInt();
    int min = Integer.MAX_VALUE;
    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += L + i;
      if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      }
    }
    System.out.println(sum - min);
  } main {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int L = in.nextInt();
    int min = Integer.MAX_VALUE;
    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += L + i;
      if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      }
    }
    System.out.println(sum - min);
  } Scanner in = new Scanner(System.in); in new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int L = in.nextInt(); L in.nextInt() in.nextInt in int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int sum = 0; sum 0 for (int i = 0; i < N; i++) {
      sum += L + i;
      if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      }
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
      sum += L + i;
      if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      }
    } {
      sum += L + i;
      if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      }
    } sum += L + i sum L + i L i if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      } Math.abs(L + i) < Math.abs(min) Math.abs(L + i) Math.abs Math L + i L i Math.abs(min) Math.abs Math min {
        min = L + i;
      } min = L + i min L + i L i System.out.println(sum - min) System.out.println System.out System System.out sum - min sum min String[] args args public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int L = in.nextInt();
    int min = Integer.MAX_VALUE;
    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += L + i;
      if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      }
    }
    System.out.println(sum - min);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int L = in.nextInt();
    int min = Integer.MAX_VALUE;
    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += L + i;
      if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      }
    }
    System.out.println(sum - min);
  }
} Main
import java.util.*;
import java.util.stream.*;

public class Main {
  public static void main(String[] args) {
    Scanner in = new Scanner(System.in);
    int N = in.nextInt();
    int L = in.nextInt();
    int min = Integer.MAX_VALUE;
    int sum = 0;
    for (int i = 0; i < N; i++) {
      sum += L + i;
      if (Math.abs(L + i) < Math.abs(min)) {
        min = L + i;
      }
    }
    System.out.println(sum - min);
  }
}
