import 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 sum = 0;
    int min = 300;
    int apple = min;
    for(int i=1;i<=N;i++){
      int d = L+i-1;
      sum+=d;
      if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      }
    }
    System.out.println(sum-apple);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    int sum = 0;
    int min = 300;
    int apple = min;
    for(int i=1;i<=N;i++){
      int d = L+i-1;
      sum+=d;
      if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      }
    }
    System.out.println(sum-apple);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    int sum = 0;
    int min = 300;
    int apple = min;
    for(int i=1;i<=N;i++){
      int d = L+i-1;
      sum+=d;
      if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      }
    }
    System.out.println(sum-apple);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    int sum = 0;
    int min = 300;
    int apple = min;
    for(int i=1;i<=N;i++){
      int d = L+i-1;
      sum+=d;
      if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      }
    }
    System.out.println(sum-apple);
  } 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 sum = 0; sum 0 int min = 300; min 300 int apple = min; apple min for(int i=1;i<=N;i++){
      int d = L+i-1;
      sum+=d;
      if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      }
    } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
      int d = L+i-1;
      sum+=d;
      if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      }
    } {
      int d = L+i-1;
      sum+=d;
      if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      }
    } int d = L+i-1; d L+i-1 L+i L i 1 sum+=d sum d if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      } Math.abs(d)<min Math.abs(d) Math.abs Math d min {
        min = Math.abs(d);
        apple = d;
      } min = Math.abs(d) min Math.abs(d) Math.abs Math d apple = d apple d System.out.println(sum-apple) System.out.println System.out System System.out sum-apple sum apple 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 sum = 0;
    int min = 300;
    int apple = min;
    for(int i=1;i<=N;i++){
      int d = L+i-1;
      sum+=d;
      if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      }
    }
    System.out.println(sum-apple);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    int sum = 0;
    int min = 300;
    int apple = min;
    for(int i=1;i<=N;i++){
      int d = L+i-1;
      sum+=d;
      if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      }
    }
    System.out.println(sum-apple);
  }
} Main
import 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 sum = 0;
    int min = 300;
    int apple = min;
    for(int i=1;i<=N;i++){
      int d = L+i-1;
      sum+=d;
      if(Math.abs(d)<min){
        min = Math.abs(d);
        apple = d;
      }
    }
    System.out.println(sum-apple);
  }
}