
import java.util.*;

class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int L = stdIn.nextInt();
        int minAbs = 100 + 200 - 1;
        int t = 0;
        if(L <= 0){
            if(L + n - 1 >= 0);
            else t = L + n - 1;
        }else{
            t = L;
        }
        System.out.println( n * (n + 2 * L -1) / 2 - t );
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int L = stdIn.nextInt();
        int minAbs = 100 + 200 - 1;
        int t = 0;
        if(L <= 0){
            if(L + n - 1 >= 0);
            else t = L + n - 1;
        }else{
            t = L;
        }
        System.out.println( n * (n + 2 * L -1) / 2 - t );
    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int L = stdIn.nextInt();
        int minAbs = 100 + 200 - 1;
        int t = 0;
        if(L <= 0){
            if(L + n - 1 >= 0);
            else t = L + n - 1;
        }else{
            t = L;
        }
        System.out.println( n * (n + 2 * L -1) / 2 - t );
    } main {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int L = stdIn.nextInt();
        int minAbs = 100 + 200 - 1;
        int t = 0;
        if(L <= 0){
            if(L + n - 1 >= 0);
            else t = L + n - 1;
        }else{
            t = L;
        }
        System.out.println( n * (n + 2 * L -1) / 2 - t );
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) int n = stdIn.nextInt(); n stdIn.nextInt() stdIn.nextInt stdIn int L = stdIn.nextInt(); L stdIn.nextInt() stdIn.nextInt stdIn int minAbs = 100 + 200 - 1; minAbs 100 + 200 - 1 100 + 200 100 200 1 int t = 0; t 0 if(L <= 0){
            if(L + n - 1 >= 0);
            else t = L + n - 1;
        }else{
            t = L;
        } L <= 0 L 0 {
            if(L + n - 1 >= 0);
            else t = L + n - 1;
        } if(L + n - 1 >= 0);
            else t = L + n - 1; L + n - 1 >= 0 L + n - 1 L + n L n 1 0 t = L + n - 1 t L + n - 1 L + n L n 1 {
            t = L;
        } t = L t L System.out.println( n * (n + 2 * L -1) / 2 - t ) System.out.println System.out System System.out n * (n + 2 * L -1) / 2 - t n * (n + 2 * L -1) / 2 n * (n + 2 * L -1) n (n + 2 * L -1) n + 2 * L n 2 * L 2 L 1 2 t String[] args args

import java.util.*;

class Main{
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);
        int n = stdIn.nextInt();
        int L = stdIn.nextInt();
        int minAbs = 100 + 200 - 1;
        int t = 0;
        if(L <= 0){
            if(L + n - 1 >= 0);
            else t = L + n - 1;
        }else{
            t = L;
        }
        System.out.println( n * (n + 2 * L -1) / 2 - t );
    }
}