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 min = Integer.MAX_VALUE;
    int ans = 0;

    for (int i = 1; i <= n; i++) {
      int tmp = (l + i) - 1;
      ans += tmp;
      if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      }
    }

    System.out.println(ans - min);

  }
} 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 min = Integer.MAX_VALUE;
    int ans = 0;

    for (int i = 1; i <= n; i++) {
      int tmp = (l + i) - 1;
      ans += tmp;
      if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      }
    }

    System.out.println(ans - min);

  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int l = sc.nextInt();
    int min = Integer.MAX_VALUE;
    int ans = 0;

    for (int i = 1; i <= n; i++) {
      int tmp = (l + i) - 1;
      ans += tmp;
      if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      }
    }

    System.out.println(ans - min);

  } main {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int l = sc.nextInt();
    int min = Integer.MAX_VALUE;
    int ans = 0;

    for (int i = 1; i <= n; i++) {
      int tmp = (l + i) - 1;
      ans += tmp;
      if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      }
    }

    System.out.println(ans - min);

  } 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 min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int ans = 0; ans 0 for (int i = 1; i <= n; i++) {
      int tmp = (l + i) - 1;
      ans += tmp;
      if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      }
    } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
      int tmp = (l + i) - 1;
      ans += tmp;
      if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      }
    } {
      int tmp = (l + i) - 1;
      ans += tmp;
      if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      }
    } int tmp = (l + i) - 1; tmp (l + i) - 1 (l + i) l i 1 ans += tmp ans tmp if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      } Math.abs(min) > Math.abs(tmp) Math.abs(min) Math.abs Math min Math.abs(tmp) Math.abs Math tmp {
        min = tmp;
      } min = tmp min tmp System.out.println(ans - min) System.out.println System.out System System.out ans - min ans min 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 min = Integer.MAX_VALUE;
    int ans = 0;

    for (int i = 1; i <= n; i++) {
      int tmp = (l + i) - 1;
      ans += tmp;
      if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      }
    }

    System.out.println(ans - min);

  }
} public class Main {

  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int l = sc.nextInt();
    int min = Integer.MAX_VALUE;
    int ans = 0;

    for (int i = 1; i <= n; i++) {
      int tmp = (l + i) - 1;
      ans += tmp;
      if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      }
    }

    System.out.println(ans - min);

  }
} 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 min = Integer.MAX_VALUE;
    int ans = 0;

    for (int i = 1; i <= n; i++) {
      int tmp = (l + i) - 1;
      ans += tmp;
      if (Math.abs(min) > Math.abs(tmp)) {
        min = tmp;
      }
    }

    System.out.println(ans - min);

  }
}