import 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 min = Math.abs(L);
        int x = 0;
        int ans = 0;

        for(int i=1; i<=N; i++){
            int abs = Math.abs(L + i - 1);
            if(min>=abs){
                min = abs;
                x = i;
            }
        }
        for(int i=1; i<=N; i++){
            if(i==x){
                continue;
            }
            ans += L + i - 1;
        }
        System.out.println(ans);
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int L = sc.nextInt();
        int min = Math.abs(L);
        int x = 0;
        int ans = 0;

        for(int i=1; i<=N; i++){
            int abs = Math.abs(L + i - 1);
            if(min>=abs){
                min = abs;
                x = i;
            }
        }
        for(int i=1; i<=N; i++){
            if(i==x){
                continue;
            }
            ans += L + i - 1;
        }
        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 min = Math.abs(L);
        int x = 0;
        int ans = 0;

        for(int i=1; i<=N; i++){
            int abs = Math.abs(L + i - 1);
            if(min>=abs){
                min = abs;
                x = i;
            }
        }
        for(int i=1; i<=N; i++){
            if(i==x){
                continue;
            }
            ans += L + i - 1;
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int L = sc.nextInt();
        int min = Math.abs(L);
        int x = 0;
        int ans = 0;

        for(int i=1; i<=N; i++){
            int abs = Math.abs(L + i - 1);
            if(min>=abs){
                min = abs;
                x = i;
            }
        }
        for(int i=1; i<=N; i++){
            if(i==x){
                continue;
            }
            ans += L + i - 1;
        }
        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 min = Math.abs(L); min Math.abs(L) Math.abs Math L int x = 0; x 0 int ans = 0; ans 0 for(int i=1; i<=N; i++){
            int abs = Math.abs(L + i - 1);
            if(min>=abs){
                min = abs;
                x = i;
            }
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            int abs = Math.abs(L + i - 1);
            if(min>=abs){
                min = abs;
                x = i;
            }
        } {
            int abs = Math.abs(L + i - 1);
            if(min>=abs){
                min = abs;
                x = i;
            }
        } int abs = Math.abs(L + i - 1); abs Math.abs(L + i - 1) Math.abs Math L + i - 1 L + i L i 1 if(min>=abs){
                min = abs;
                x = i;
            } min>=abs min abs {
                min = abs;
                x = i;
            } min = abs min abs x = i x i for(int i=1; i<=N; i++){
            if(i==x){
                continue;
            }
            ans += L + i - 1;
        } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
            if(i==x){
                continue;
            }
            ans += L + i - 1;
        } {
            if(i==x){
                continue;
            }
            ans += L + i - 1;
        } if(i==x){
                continue;
            } i==x i x {
                continue;
            } continue; ans += L + i - 1 ans L + i - 1 L + i L i 1 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 min = Math.abs(L);
        int x = 0;
        int ans = 0;

        for(int i=1; i<=N; i++){
            int abs = Math.abs(L + i - 1);
            if(min>=abs){
                min = abs;
                x = i;
            }
        }
        for(int i=1; i<=N; i++){
            if(i==x){
                continue;
            }
            ans += L + i - 1;
        }
        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 min = Math.abs(L);
        int x = 0;
        int ans = 0;

        for(int i=1; i<=N; i++){
            int abs = Math.abs(L + i - 1);
            if(min>=abs){
                min = abs;
                x = i;
            }
        }
        for(int i=1; i<=N; i++){
            if(i==x){
                continue;
            }
            ans += L + i - 1;
        }
        System.out.println(ans);
    }
} Main
import 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 min = Math.abs(L);
        int x = 0;
        int ans = 0;

        for(int i=1; i<=N; i++){
            int abs = Math.abs(L + i - 1);
            if(min>=abs){
                min = abs;
                x = i;
            }
        }
        for(int i=1; i<=N; i++){
            if(i==x){
                continue;
            }
            ans += L + i - 1;
        }
        System.out.println(ans);
    }
}