import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner S = new Scanner(System.in);
    int N = S.nextInt();
    int L = S.nextInt();
    int sum = N*(L - 1) + N*(N+1)/2;
    if( (L <= 0) & (0 <= L+N-1)){
      System.out.println(sum);
    }
    if( 0 < L ){
      System.out.println(sum - L);
    }
    if( L+N-1 < 0 ){
      System.out.println(sum - L-N+1);
    }
  }
} import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[] args){
    Scanner S = new Scanner(System.in);
    int N = S.nextInt();
    int L = S.nextInt();
    int sum = N*(L - 1) + N*(N+1)/2;
    if( (L <= 0) & (0 <= L+N-1)){
      System.out.println(sum);
    }
    if( 0 < L ){
      System.out.println(sum - L);
    }
    if( L+N-1 < 0 ){
      System.out.println(sum - L-N+1);
    }
  }
} Main public static void main(String[] args){
    Scanner S = new Scanner(System.in);
    int N = S.nextInt();
    int L = S.nextInt();
    int sum = N*(L - 1) + N*(N+1)/2;
    if( (L <= 0) & (0 <= L+N-1)){
      System.out.println(sum);
    }
    if( 0 < L ){
      System.out.println(sum - L);
    }
    if( L+N-1 < 0 ){
      System.out.println(sum - L-N+1);
    }
  } main {
    Scanner S = new Scanner(System.in);
    int N = S.nextInt();
    int L = S.nextInt();
    int sum = N*(L - 1) + N*(N+1)/2;
    if( (L <= 0) & (0 <= L+N-1)){
      System.out.println(sum);
    }
    if( 0 < L ){
      System.out.println(sum - L);
    }
    if( L+N-1 < 0 ){
      System.out.println(sum - L-N+1);
    }
  } Scanner S = new Scanner(System.in); S new Scanner(System.in) int N = S.nextInt(); N S.nextInt() S.nextInt S int L = S.nextInt(); L S.nextInt() S.nextInt S int sum = N*(L - 1) + N*(N+1)/2; sum N*(L - 1) + N*(N+1)/2 N*(L - 1) N (L - 1) L 1 N*(N+1)/2 N*(N+1) N (N+1) N 1 2 if( (L <= 0) & (0 <= L+N-1)){
      System.out.println(sum);
    } (L <= 0) & (0 <= L+N-1) (L <= 0) L 0 (0 <= L+N-1) 0 L+N-1 L+N L N 1 {
      System.out.println(sum);
    } System.out.println(sum) System.out.println System.out System System.out sum if( 0 < L ){
      System.out.println(sum - L);
    } 0 < L 0 L {
      System.out.println(sum - L);
    } System.out.println(sum - L) System.out.println System.out System System.out sum - L sum L if( L+N-1 < 0 ){
      System.out.println(sum - L-N+1);
    } L+N-1 < 0 L+N-1 L+N L N 1 0 {
      System.out.println(sum - L-N+1);
    } System.out.println(sum - L-N+1) System.out.println System.out System System.out sum - L-N+1 sum - L-N sum - L-N sum L N 1 String[] args args public class Main{
  public static void main(String[] args){
    Scanner S = new Scanner(System.in);
    int N = S.nextInt();
    int L = S.nextInt();
    int sum = N*(L - 1) + N*(N+1)/2;
    if( (L <= 0) & (0 <= L+N-1)){
      System.out.println(sum);
    }
    if( 0 < L ){
      System.out.println(sum - L);
    }
    if( L+N-1 < 0 ){
      System.out.println(sum - L-N+1);
    }
  }
} public class Main{
  public static void main(String[] args){
    Scanner S = new Scanner(System.in);
    int N = S.nextInt();
    int L = S.nextInt();
    int sum = N*(L - 1) + N*(N+1)/2;
    if( (L <= 0) & (0 <= L+N-1)){
      System.out.println(sum);
    }
    if( 0 < L ){
      System.out.println(sum - L);
    }
    if( L+N-1 < 0 ){
      System.out.println(sum - L-N+1);
    }
  }
} Main
import java.util.Scanner;
public class Main{
  public static void main(String[] args){
    Scanner S = new Scanner(System.in);
    int N = S.nextInt();
    int L = S.nextInt();
    int sum = N*(L - 1) + N*(N+1)/2;
    if( (L <= 0) & (0 <= L+N-1)){
      System.out.println(sum);
    }
    if( 0 < L ){
      System.out.println(sum - L);
    }
    if( L+N-1 < 0 ){
      System.out.println(sum - L-N+1);
    }
  }
}