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 x = 0;
    
    for(int i=1; i<=N; i++){
      x = x + L + i -1;
    }
    
    int y = 0;
    for(int i=1; i<=N; i++){
      if(L - 1 + i == 0){
        y = i;
      }
    }
    if(y == 0){
      if(L * L > (L + N - 1) * (L + N - 1)){
        y = N;
      }else {
        y = 1;
      }
    }
    System.out.println(x - L + 1 - y);
  }
}
          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 x = 0;
    
    for(int i=1; i<=N; i++){
      x = x + L + i -1;
    }
    
    int y = 0;
    for(int i=1; i<=N; i++){
      if(L - 1 + i == 0){
        y = i;
      }
    }
    if(y == 0){
      if(L * L > (L + N - 1) * (L + N - 1)){
        y = N;
      }else {
        y = 1;
      }
    }
    System.out.println(x - L + 1 - y);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    int x = 0;
    
    for(int i=1; i<=N; i++){
      x = x + L + i -1;
    }
    
    int y = 0;
    for(int i=1; i<=N; i++){
      if(L - 1 + i == 0){
        y = i;
      }
    }
    if(y == 0){
      if(L * L > (L + N - 1) * (L + N - 1)){
        y = N;
      }else {
        y = 1;
      }
    }
    System.out.println(x - L + 1 - y);
  } main {
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    int x = 0;
    
    for(int i=1; i<=N; i++){
      x = x + L + i -1;
    }
    
    int y = 0;
    for(int i=1; i<=N; i++){
      if(L - 1 + i == 0){
        y = i;
      }
    }
    if(y == 0){
      if(L * L > (L + N - 1) * (L + N - 1)){
        y = N;
      }else {
        y = 1;
      }
    }
    System.out.println(x - L + 1 - y);
  } 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 x = 0; x 0 for(int i=1; i<=N; i++){
      x = x + L + i -1;
    } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
      x = x + L + i -1;
    } {
      x = x + L + i -1;
    } x = x + L + i -1 x x + L + i -1 x + L + i x + L + i x L i 1 int y = 0; y 0 for(int i=1; i<=N; i++){
      if(L - 1 + i == 0){
        y = i;
      }
    } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
      if(L - 1 + i == 0){
        y = i;
      }
    } {
      if(L - 1 + i == 0){
        y = i;
      }
    } if(L - 1 + i == 0){
        y = i;
      } L - 1 + i == 0 L - 1 + i L - 1 L 1 i 0 {
        y = i;
      } y = i y i if(y == 0){
      if(L * L > (L + N - 1) * (L + N - 1)){
        y = N;
      }else {
        y = 1;
      }
    } y == 0 y 0 {
      if(L * L > (L + N - 1) * (L + N - 1)){
        y = N;
      }else {
        y = 1;
      }
    } if(L * L > (L + N - 1) * (L + N - 1)){
        y = N;
      }else {
        y = 1;
      } L * L > (L + N - 1) * (L + N - 1) L * L L L (L + N - 1) * (L + N - 1) (L + N - 1) L + N L N 1 (L + N - 1) L + N L N 1 {
        y = N;
      } y = N y N {
        y = 1;
      } y = 1 y 1 System.out.println(x - L + 1 - y) System.out.println System.out System System.out x - L + 1 - y x - L + 1 x - L x L 1 y 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 x = 0;
    
    for(int i=1; i<=N; i++){
      x = x + L + i -1;
    }
    
    int y = 0;
    for(int i=1; i<=N; i++){
      if(L - 1 + i == 0){
        y = i;
      }
    }
    if(y == 0){
      if(L * L > (L + N - 1) * (L + N - 1)){
        y = N;
      }else {
        y = 1;
      }
    }
    System.out.println(x - L + 1 - y);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    int x = 0;
    
    for(int i=1; i<=N; i++){
      x = x + L + i -1;
    }
    
    int y = 0;
    for(int i=1; i<=N; i++){
      if(L - 1 + i == 0){
        y = i;
      }
    }
    if(y == 0){
      if(L * L > (L + N - 1) * (L + N - 1)){
        y = N;
      }else {
        y = 1;
      }
    }
    System.out.println(x - L + 1 - y);
  }
} 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 x = 0;
    
    for(int i=1; i<=N; i++){
      x = x + L + i -1;
    }
    
    int y = 0;
    for(int i=1; i<=N; i++){
      if(L - 1 + i == 0){
        y = i;
      }
    }
    if(y == 0){
      if(L * L > (L + N - 1) * (L + N - 1)){
        y = N;
      }else {
        y = 1;
      }
    }
    System.out.println(x - L + 1 - y);
  }
}
         