import java.util.Scanner;

public 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 tasteOfPie = 0;
        int minApple = 300;
        int minIndex = 0;
        for (int i = 1; i < N+1; ++i){
            int taste =  L + i - 1;
            tasteOfPie += taste;
            if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            }
        }
        System.out.println(tasteOfPie - (L+minIndex-1));
    }
} import java.util.Scanner; Scanner java.util public 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 tasteOfPie = 0;
        int minApple = 300;
        int minIndex = 0;
        for (int i = 1; i < N+1; ++i){
            int taste =  L + i - 1;
            tasteOfPie += taste;
            if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            }
        }
        System.out.println(tasteOfPie - (L+minIndex-1));
    }
} 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 tasteOfPie = 0;
        int minApple = 300;
        int minIndex = 0;
        for (int i = 1; i < N+1; ++i){
            int taste =  L + i - 1;
            tasteOfPie += taste;
            if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            }
        }
        System.out.println(tasteOfPie - (L+minIndex-1));
    } main {
        Scanner sc = new Scanner(System.in);
		int N = Integer.parseInt(sc.next());
        int L = Integer.parseInt(sc.next());
        int tasteOfPie = 0;
        int minApple = 300;
        int minIndex = 0;
        for (int i = 1; i < N+1; ++i){
            int taste =  L + i - 1;
            tasteOfPie += taste;
            if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            }
        }
        System.out.println(tasteOfPie - (L+minIndex-1));
    } 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 tasteOfPie = 0; tasteOfPie 0 int minApple = 300; minApple 300 int minIndex = 0; minIndex 0 for (int i = 1; i < N+1; ++i){
            int taste =  L + i - 1;
            tasteOfPie += taste;
            if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            }
        } int i = 1; int i = 1; i 1 i < N+1 i N+1 N 1 ++i ++i i {
            int taste =  L + i - 1;
            tasteOfPie += taste;
            if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            }
        } {
            int taste =  L + i - 1;
            tasteOfPie += taste;
            if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            }
        } int taste =  L + i - 1; taste L + i - 1 L + i L i 1 tasteOfPie += taste tasteOfPie taste if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            } minApple > Math.abs(taste) minApple Math.abs(taste) Math.abs Math taste {
                minApple = Math.abs(taste);
                minIndex = i;
            } minApple = Math.abs(taste) minApple Math.abs(taste) Math.abs Math taste minIndex = i minIndex i System.out.println(tasteOfPie - (L+minIndex-1)) System.out.println System.out System System.out tasteOfPie - (L+minIndex-1) tasteOfPie (L+minIndex-1) L+minIndex L minIndex 1 String[] args args public 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 tasteOfPie = 0;
        int minApple = 300;
        int minIndex = 0;
        for (int i = 1; i < N+1; ++i){
            int taste =  L + i - 1;
            tasteOfPie += taste;
            if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            }
        }
        System.out.println(tasteOfPie - (L+minIndex-1));
    }
} public 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 tasteOfPie = 0;
        int minApple = 300;
        int minIndex = 0;
        for (int i = 1; i < N+1; ++i){
            int taste =  L + i - 1;
            tasteOfPie += taste;
            if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            }
        }
        System.out.println(tasteOfPie - (L+minIndex-1));
    }
} Main
import java.util.Scanner;

public 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 tasteOfPie = 0;
        int minApple = 300;
        int minIndex = 0;
        for (int i = 1; i < N+1; ++i){
            int taste =  L + i - 1;
            tasteOfPie += taste;
            if (minApple > Math.abs(taste)){
                minApple = Math.abs(taste);
                minIndex = i;
            }
        }
        System.out.println(tasteOfPie - (L+minIndex-1));
    }
}