import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int apple = 1000000;
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        sc.close();
        for(int i=0;i<n;i++){
            sum+=l+i;
            if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            }
        }
        System.out.println(sum-apple);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int apple = 1000000;
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        sc.close();
        for(int i=0;i<n;i++){
            sum+=l+i;
            if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            }
        }
        System.out.println(sum-apple);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int apple = 1000000;
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        sc.close();
        for(int i=0;i<n;i++){
            sum+=l+i;
            if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            }
        }
        System.out.println(sum-apple);
    } main {
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int apple = 1000000;
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        sc.close();
        for(int i=0;i<n;i++){
            sum+=l+i;
            if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            }
        }
        System.out.println(sum-apple);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int sum = 0; sum 0 int apple = 1000000; apple 1000000 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 sc.close() sc.close sc for(int i=0;i<n;i++){
            sum+=l+i;
            if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            }
        } int i=0; int i=0; i 0 i<n i n i++ i++ i {
            sum+=l+i;
            if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            }
        } {
            sum+=l+i;
            if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            }
        } sum+=l+i sum l+i l i if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            } Math.abs(apple) > Math.abs(l+i) Math.abs(apple) Math.abs Math apple Math.abs(l+i) Math.abs Math l+i l i {
                apple = l+i;
            } apple = l+i apple l+i l i System.out.println(sum-apple) System.out.println System.out System System.out sum-apple sum apple String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int apple = 1000000;
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        sc.close();
        for(int i=0;i<n;i++){
            sum+=l+i;
            if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            }
        }
        System.out.println(sum-apple);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int apple = 1000000;
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        sc.close();
        for(int i=0;i<n;i++){
            sum+=l+i;
            if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            }
        }
        System.out.println(sum-apple);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int sum = 0;
        int apple = 1000000;
        int n = Integer.parseInt(sc.next());
        int l = Integer.parseInt(sc.next());
        sc.close();
        for(int i=0;i<n;i++){
            sum+=l+i;
            if(Math.abs(apple) > Math.abs(l+i)){
                apple = l+i;
            }
        }
        System.out.println(sum-apple);
    }
}