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;
    if(l > 0){
      for(int idx=0; idx<n-1; idx++){
        taste += l + idx + 1;
      }
    }else if(l == 0){
      for(int idx=0; idx<n; idx++){
        taste += l + idx;
      }      
    }else if(l < 0){
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    }

    System.out.println(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;
    if(l > 0){
      for(int idx=0; idx<n-1; idx++){
        taste += l + idx + 1;
      }
    }else if(l == 0){
      for(int idx=0; idx<n; idx++){
        taste += l + idx;
      }      
    }else if(l < 0){
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    }

    System.out.println(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;
    if(l > 0){
      for(int idx=0; idx<n-1; idx++){
        taste += l + idx + 1;
      }
    }else if(l == 0){
      for(int idx=0; idx<n; idx++){
        taste += l + idx;
      }      
    }else if(l < 0){
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    }

    System.out.println(taste);
    
  } main {
    Scanner sc = new Scanner(System.in);
    int n = sc.nextInt();
    int l = sc.nextInt();
    int taste = 0;
    if(l > 0){
      for(int idx=0; idx<n-1; idx++){
        taste += l + idx + 1;
      }
    }else if(l == 0){
      for(int idx=0; idx<n; idx++){
        taste += l + idx;
      }      
    }else if(l < 0){
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    }

    System.out.println(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 if(l > 0){
      for(int idx=0; idx<n-1; idx++){
        taste += l + idx + 1;
      }
    }else if(l == 0){
      for(int idx=0; idx<n; idx++){
        taste += l + idx;
      }      
    }else if(l < 0){
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    } l > 0 l 0 {
      for(int idx=0; idx<n-1; idx++){
        taste += l + idx + 1;
      }
    } for(int idx=0; idx<n-1; idx++){
        taste += l + idx + 1;
      } int idx=0; int idx=0; idx 0 idx<n-1 idx n-1 n 1 idx++ idx++ idx {
        taste += l + idx + 1;
      } {
        taste += l + idx + 1;
      } taste += l + idx + 1 taste l + idx + 1 l + idx + 1 l idx 1 if(l == 0){
      for(int idx=0; idx<n; idx++){
        taste += l + idx;
      }      
    }else if(l < 0){
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    } l == 0 l 0 {
      for(int idx=0; idx<n; idx++){
        taste += l + idx;
      }      
    } for(int idx=0; idx<n; idx++){
        taste += l + idx;
      } int idx=0; int idx=0; idx 0 idx<n idx n idx++ idx++ idx {
        taste += l + idx;
      } {
        taste += l + idx;
      } taste += l + idx taste l + idx l idx if(l < 0){
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    } l < 0 l 0 {
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    } if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      } n + l > 0 n + l n l 0 {
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      } for(int idx=0; idx<n; idx++){
          taste += l + idx;
        } int idx=0; int idx=0; idx 0 idx<n idx n idx++ idx++ idx {
          taste += l + idx;
        } {
          taste += l + idx;
        } taste += l + idx taste l + idx l idx {
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      } for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        } int idx=0; int idx=0; idx 0 idx<n - 1 idx n - 1 n 1 idx++ idx++ idx {
          taste += l + idx;
        } {
          taste += l + idx;
        } taste += l + idx taste l + idx l idx System.out.println(taste) System.out.println System.out System System.out 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;
    if(l > 0){
      for(int idx=0; idx<n-1; idx++){
        taste += l + idx + 1;
      }
    }else if(l == 0){
      for(int idx=0; idx<n; idx++){
        taste += l + idx;
      }      
    }else if(l < 0){
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    }

    System.out.println(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;
    if(l > 0){
      for(int idx=0; idx<n-1; idx++){
        taste += l + idx + 1;
      }
    }else if(l == 0){
      for(int idx=0; idx<n; idx++){
        taste += l + idx;
      }      
    }else if(l < 0){
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    }

    System.out.println(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;
    if(l > 0){
      for(int idx=0; idx<n-1; idx++){
        taste += l + idx + 1;
      }
    }else if(l == 0){
      for(int idx=0; idx<n; idx++){
        taste += l + idx;
      }      
    }else if(l < 0){
      if(n + l > 0){
        for(int idx=0; idx<n; idx++){
          taste += l + idx;
        }              
      }else{
        for(int idx=0; idx<n - 1; idx++){
          taste += l + idx;
        }                      
      }
    }

    System.out.println(taste);
    
  }
}
