import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        
        int absMin = 1000000;
        int eatNum = 0;
        for(int i = 1; i <= N; i++){
            if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            }
        }
        
        int sum = 0;
        for(int i = 1; i <= N; i++){
            if ( i == eatNum ) continue;
            sum += (L + i - 1);
        }
        
        System.out.println(sum);
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        
        int absMin = 1000000;
        int eatNum = 0;
        for(int i = 1; i <= N; i++){
            if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            }
        }
        
        int sum = 0;
        for(int i = 1; i <= N; i++){
            if ( i == eatNum ) continue;
            sum += (L + i - 1);
        }
        
        System.out.println(sum);
    }
} Main public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        
        int absMin = 1000000;
        int eatNum = 0;
        for(int i = 1; i <= N; i++){
            if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            }
        }
        
        int sum = 0;
        for(int i = 1; i <= N; i++){
            if ( i == eatNum ) continue;
            sum += (L + i - 1);
        }
        
        System.out.println(sum);
    } main {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        
        int absMin = 1000000;
        int eatNum = 0;
        for(int i = 1; i <= N; i++){
            if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            }
        }
        
        int sum = 0;
        for(int i = 1; i <= N; i++){
            if ( i == eatNum ) continue;
            sum += (L + i - 1);
        }
        
        System.out.println(sum);
    } 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 absMin = 1000000; absMin 1000000 int eatNum = 0; eatNum 0 for(int i = 1; i <= N; i++){
            if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            }
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            }
        } {
            if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            }
        } if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            } absMin > Math.abs(L + i - 1) absMin Math.abs(L + i - 1) Math.abs Math L + i - 1 L + i L i 1 {
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            } absMin = Math.abs(L + i - 1) absMin Math.abs(L + i - 1) Math.abs Math L + i - 1 L + i L i 1 eatNum = i eatNum i int sum = 0; sum 0 for(int i = 1; i <= N; i++){
            if ( i == eatNum ) continue;
            sum += (L + i - 1);
        } int i = 1; int i = 1; i 1 i <= N i N i++ i++ i {
            if ( i == eatNum ) continue;
            sum += (L + i - 1);
        } {
            if ( i == eatNum ) continue;
            sum += (L + i - 1);
        } if ( i == eatNum ) continue; i == eatNum i eatNum continue; sum += (L + i - 1) sum (L + i - 1) L + i L i 1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        
        int absMin = 1000000;
        int eatNum = 0;
        for(int i = 1; i <= N; i++){
            if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            }
        }
        
        int sum = 0;
        for(int i = 1; i <= N; i++){
            if ( i == eatNum ) continue;
            sum += (L + i - 1);
        }
        
        System.out.println(sum);
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        
        int absMin = 1000000;
        int eatNum = 0;
        for(int i = 1; i <= N; i++){
            if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            }
        }
        
        int sum = 0;
        for(int i = 1; i <= N; i++){
            if ( i == eatNum ) continue;
            sum += (L + i - 1);
        }
        
        System.out.println(sum);
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        
        int absMin = 1000000;
        int eatNum = 0;
        for(int i = 1; i <= N; i++){
            if ( absMin > Math.abs(L + i - 1) ){
                absMin = Math.abs(L + i - 1);
                eatNum = i;
            }
        }
        
        int sum = 0;
        for(int i = 1; i <= N; i++){
            if ( i == eatNum ) continue;
            sum += (L + i - 1);
        }
        
        System.out.println(sum);
    }
}
