import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = b+(a-1);
        if(c>=0&&b<=0){
            System.out.println(a*(b+c)/2);
        }else if(c<0&&b<0){
            System.out.println(a*(b+c)/2-c);
        }else{
            System.out.println(a*(b+c)/2-b);
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = b+(a-1);
        if(c>=0&&b<=0){
            System.out.println(a*(b+c)/2);
        }else if(c<0&&b<0){
            System.out.println(a*(b+c)/2-c);
        }else{
            System.out.println(a*(b+c)/2-b);
        }
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = b+(a-1);
        if(c>=0&&b<=0){
            System.out.println(a*(b+c)/2);
        }else if(c<0&&b<0){
            System.out.println(a*(b+c)/2-c);
        }else{
            System.out.println(a*(b+c)/2-b);
        }
    } main {
        Scanner scan = new Scanner(System.in);

        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = b+(a-1);
        if(c>=0&&b<=0){
            System.out.println(a*(b+c)/2);
        }else if(c<0&&b<0){
            System.out.println(a*(b+c)/2-c);
        }else{
            System.out.println(a*(b+c)/2-b);
        }
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int c = b+(a-1); c b+(a-1) b (a-1) a 1 if(c>=0&&b<=0){
            System.out.println(a*(b+c)/2);
        }else if(c<0&&b<0){
            System.out.println(a*(b+c)/2-c);
        }else{
            System.out.println(a*(b+c)/2-b);
        } c>=0&&b<=0 c>=0 c 0 b<=0 b 0 {
            System.out.println(a*(b+c)/2);
        } System.out.println(a*(b+c)/2) System.out.println System.out System System.out a*(b+c)/2 a*(b+c) a (b+c) b c 2 if(c<0&&b<0){
            System.out.println(a*(b+c)/2-c);
        }else{
            System.out.println(a*(b+c)/2-b);
        } c<0&&b<0 c<0 c 0 b<0 b 0 {
            System.out.println(a*(b+c)/2-c);
        } System.out.println(a*(b+c)/2-c) System.out.println System.out System System.out a*(b+c)/2-c a*(b+c)/2 a*(b+c) a (b+c) b c 2 c {
            System.out.println(a*(b+c)/2-b);
        } System.out.println(a*(b+c)/2-b) System.out.println System.out System System.out a*(b+c)/2-b a*(b+c)/2 a*(b+c) a (b+c) b c 2 b String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = b+(a-1);
        if(c>=0&&b<=0){
            System.out.println(a*(b+c)/2);
        }else if(c<0&&b<0){
            System.out.println(a*(b+c)/2-c);
        }else{
            System.out.println(a*(b+c)/2-b);
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = b+(a-1);
        if(c>=0&&b<=0){
            System.out.println(a*(b+c)/2);
        }else if(c<0&&b<0){
            System.out.println(a*(b+c)/2-c);
        }else{
            System.out.println(a*(b+c)/2-b);
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int a = scan.nextInt();
        int b = scan.nextInt();
        int c = b+(a-1);
        if(c>=0&&b<=0){
            System.out.println(a*(b+c)/2);
        }else if(c<0&&b<0){
            System.out.println(a*(b+c)/2-c);
        }else{
            System.out.println(a*(b+c)/2-b);
        }
    }
}