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 r[] = new int[n];
    int a[] = new int[n];
    for(int i = 0 ; i < n ; ++i){
      a[i] = l+i;
      r[i] = Math.abs(a[i]);
    }
    int num = 0;
    int min = 1000000000;
    int sum = 0;
    for(int i = 0 ; i < n ; ++i){
      if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      }  
    }
    for(int i = 0 ; i < n ; ++i){
      if(i!=num){
        sum += a[i];
      }  
    }
    System.out.println(sum);
    
  }
} 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 r[] = new int[n];
    int a[] = new int[n];
    for(int i = 0 ; i < n ; ++i){
      a[i] = l+i;
      r[i] = Math.abs(a[i]);
    }
    int num = 0;
    int min = 1000000000;
    int sum = 0;
    for(int i = 0 ; i < n ; ++i){
      if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      }  
    }
    for(int i = 0 ; i < n ; ++i){
      if(i!=num){
        sum += a[i];
      }  
    }
    System.out.println(sum);
    
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int r[] = new int[n];
    int a[] = new int[n];
    for(int i = 0 ; i < n ; ++i){
      a[i] = l+i;
      r[i] = Math.abs(a[i]);
    }
    int num = 0;
    int min = 1000000000;
    int sum = 0;
    for(int i = 0 ; i < n ; ++i){
      if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      }  
    }
    for(int i = 0 ; i < n ; ++i){
      if(i!=num){
        sum += a[i];
      }  
    }
    System.out.println(sum);
    
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int r[] = new int[n];
    int a[] = new int[n];
    for(int i = 0 ; i < n ; ++i){
      a[i] = l+i;
      r[i] = Math.abs(a[i]);
    }
    int num = 0;
    int min = 1000000000;
    int sum = 0;
    for(int i = 0 ; i < n ; ++i){
      if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      }  
    }
    for(int i = 0 ; i < n ; ++i){
      if(i!=num){
        sum += a[i];
      }  
    }
    System.out.println(sum);
    
  } 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 r[] = new int[n]; r new int[n] n int a[] = new int[n]; a new int[n] n for(int i = 0 ; i < n ; ++i){
      a[i] = l+i;
      r[i] = Math.abs(a[i]);
    } int i = 0 ; int i = 0 ; i 0 i < n i n ++i ++i i {
      a[i] = l+i;
      r[i] = Math.abs(a[i]);
    } {
      a[i] = l+i;
      r[i] = Math.abs(a[i]);
    } a[i] = l+i a[i] a i l+i l i r[i] = Math.abs(a[i]) r[i] r i Math.abs(a[i]) Math.abs Math a[i] a i int num = 0; num 0 int min = 1000000000; min 1000000000 int sum = 0; sum 0 for(int i = 0 ; i < n ; ++i){
      if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      }  
    } int i = 0 ; int i = 0 ; i 0 i < n i n ++i ++i i {
      if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      }  
    } {
      if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      }  
    } if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      } min>r[i] min r[i] r i {
        min = Math.min(min,r[i]);
        num = i;
      } min = Math.min(min,r[i]) min Math.min(min,r[i]) Math.min Math min r[i] r i num = i num i for(int i = 0 ; i < n ; ++i){
      if(i!=num){
        sum += a[i];
      }  
    } int i = 0 ; int i = 0 ; i 0 i < n i n ++i ++i i {
      if(i!=num){
        sum += a[i];
      }  
    } {
      if(i!=num){
        sum += a[i];
      }  
    } if(i!=num){
        sum += a[i];
      } i!=num i num {
        sum += a[i];
      } sum += a[i] sum a[i] a i System.out.println(sum) System.out.println System.out System System.out sum 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 r[] = new int[n];
    int a[] = new int[n];
    for(int i = 0 ; i < n ; ++i){
      a[i] = l+i;
      r[i] = Math.abs(a[i]);
    }
    int num = 0;
    int min = 1000000000;
    int sum = 0;
    for(int i = 0 ; i < n ; ++i){
      if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      }  
    }
    for(int i = 0 ; i < n ; ++i){
      if(i!=num){
        sum += a[i];
      }  
    }
    System.out.println(sum);
    
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int r[] = new int[n];
    int a[] = new int[n];
    for(int i = 0 ; i < n ; ++i){
      a[i] = l+i;
      r[i] = Math.abs(a[i]);
    }
    int num = 0;
    int min = 1000000000;
    int sum = 0;
    for(int i = 0 ; i < n ; ++i){
      if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      }  
    }
    for(int i = 0 ; i < n ; ++i){
      if(i!=num){
        sum += a[i];
      }  
    }
    System.out.println(sum);
    
  }
} 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 r[] = new int[n];
    int a[] = new int[n];
    for(int i = 0 ; i < n ; ++i){
      a[i] = l+i;
      r[i] = Math.abs(a[i]);
    }
    int num = 0;
    int min = 1000000000;
    int sum = 0;
    for(int i = 0 ; i < n ; ++i){
      if(min>r[i]){
        min = Math.min(min,r[i]);
        num = i;
      }  
    }
    for(int i = 0 ; i < n ; ++i){
      if(i!=num){
        sum += a[i];
      }  
    }
    System.out.println(sum);
    
  }
}