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