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