import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());
        int sum = L*N;
        for(int i = 0; i <= N-1; i++) {
            sum += i;
        }
        
        if(L > 0) {
            sum -= L;
        }else {
            if(N + L <= 0) {
                sum -= (L + N - 1);
            }
        }
        System.out.println(sum);
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());
        int sum = L*N;
        for(int i = 0; i <= N-1; i++) {
            sum += i;
        }
        
        if(L > 0) {
            sum -= L;
        }else {
            if(N + L <= 0) {
                sum -= (L + N - 1);
            }
        }
        System.out.println(sum);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());
        int sum = L*N;
        for(int i = 0; i <= N-1; i++) {
            sum += i;
        }
        
        if(L > 0) {
            sum -= L;
        }else {
            if(N + L <= 0) {
                sum -= (L + N - 1);
            }
        }
        System.out.println(sum);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());
        int sum = L*N;
        for(int i = 0; i <= N-1; i++) {
            sum += i;
        }
        
        if(L > 0) {
            sum -= L;
        }else {
            if(N + L <= 0) {
                sum -= (L + N - 1);
            }
        }
        System.out.println(sum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int L = Integer.parseInt(sc.next()); L Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int sum = L*N; sum L*N L N for(int i = 0; i <= N-1; i++) {
            sum += i;
        } int i = 0; int i = 0; i 0 i <= N-1 i N-1 N 1 i++ i++ i {
            sum += i;
        } {
            sum += i;
        } sum += i sum i if(L > 0) {
            sum -= L;
        }else {
            if(N + L <= 0) {
                sum -= (L + N - 1);
            }
        } L > 0 L 0 {
            sum -= L;
        } sum -= L sum L {
            if(N + L <= 0) {
                sum -= (L + N - 1);
            }
        } if(N + L <= 0) {
                sum -= (L + N - 1);
            } N + L <= 0 N + L N L 0 {
                sum -= (L + N - 1);
            } sum -= (L + N - 1) sum (L + N - 1) L + N L N 1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args
import java.util.*;

class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());
        int sum = L*N;
        for(int i = 0; i <= N-1; i++) {
            sum += i;
        }
        
        if(L > 0) {
            sum -= L;
        }else {
            if(N + L <= 0) {
                sum -= (L + N - 1);
            }
        }
        System.out.println(sum);
    }
}