import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int l = sc.nextInt();
        
        int[] taste = new int[n];
        int min = 1000;
        int eat = 0;
        
        for(int i = 1; i <= n; i++){
            if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            }
            taste[i-1] = l + i -1;
        }
        
        int ans = 0;
        for(int i = 0; i < n; i++){
            if(i != eat){
                ans += taste[i];
            }
        }
        
        System.out.println(ans);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int l = sc.nextInt();
        
        int[] taste = new int[n];
        int min = 1000;
        int eat = 0;
        
        for(int i = 1; i <= n; i++){
            if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            }
            taste[i-1] = l + i -1;
        }
        
        int ans = 0;
        for(int i = 0; i < n; i++){
            if(i != eat){
                ans += taste[i];
            }
        }
        
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int l = sc.nextInt();
        
        int[] taste = new int[n];
        int min = 1000;
        int eat = 0;
        
        for(int i = 1; i <= n; i++){
            if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            }
            taste[i-1] = l + i -1;
        }
        
        int ans = 0;
        for(int i = 0; i < n; i++){
            if(i != eat){
                ans += taste[i];
            }
        }
        
        System.out.println(ans);
    } main {
        
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int l = sc.nextInt();
        
        int[] taste = new int[n];
        int min = 1000;
        int eat = 0;
        
        for(int i = 1; i <= n; i++){
            if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            }
            taste[i-1] = l + i -1;
        }
        
        int ans = 0;
        for(int i = 0; i < n; i++){
            if(i != eat){
                ans += taste[i];
            }
        }
        
        System.out.println(ans);
    } 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[] taste = new int[n]; taste new int[n] n int min = 1000; min 1000 int eat = 0; eat 0 for(int i = 1; i <= n; i++){
            if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            }
            taste[i-1] = l + i -1;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            }
            taste[i-1] = l + i -1;
        } {
            if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            }
            taste[i-1] = l + i -1;
        } if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            } Math.abs(l + i - 1) < min Math.abs(l + i - 1) Math.abs Math l + i - 1 l + i l i 1 min {
                min = Math.abs(l + i - 1);
                eat = i - 1;
            } min = Math.abs(l + i - 1) min Math.abs(l + i - 1) Math.abs Math l + i - 1 l + i l i 1 eat = i - 1 eat i - 1 i 1 taste[i-1] = l + i -1 taste[i-1] taste i-1 i 1 l + i -1 l + i l i 1 int ans = 0; ans 0 for(int i = 0; i < n; i++){
            if(i != eat){
                ans += taste[i];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if(i != eat){
                ans += taste[i];
            }
        } {
            if(i != eat){
                ans += taste[i];
            }
        } if(i != eat){
                ans += taste[i];
            } i != eat i eat {
                ans += taste[i];
            } ans += taste[i] ans taste[i] taste i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int l = sc.nextInt();
        
        int[] taste = new int[n];
        int min = 1000;
        int eat = 0;
        
        for(int i = 1; i <= n; i++){
            if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            }
            taste[i-1] = l + i -1;
        }
        
        int ans = 0;
        for(int i = 0; i < n; i++){
            if(i != eat){
                ans += taste[i];
            }
        }
        
        System.out.println(ans);
    }
} public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int l = sc.nextInt();
        
        int[] taste = new int[n];
        int min = 1000;
        int eat = 0;
        
        for(int i = 1; i <= n; i++){
            if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            }
            taste[i-1] = l + i -1;
        }
        
        int ans = 0;
        for(int i = 0; i < n; i++){
            if(i != eat){
                ans += taste[i];
            }
        }
        
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        
        Scanner sc = new Scanner(System.in);
        
        int n = sc.nextInt();
        int l = sc.nextInt();
        
        int[] taste = new int[n];
        int min = 1000;
        int eat = 0;
        
        for(int i = 1; i <= n; i++){
            if(Math.abs(l + i - 1) < min){
                min = Math.abs(l + i - 1);
                eat = i - 1;
            }
            taste[i-1] = l + i -1;
        }
        
        int ans = 0;
        for(int i = 0; i < n; i++){
            if(i != eat){
                ans += taste[i];
            }
        }
        
        System.out.println(ans);
    }
}