import java.util.*;

public class Main {

    public static List<List<Integer>> switchList;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        int baseVal = L - 1;
        int[] apples = new int[N];
        for (int i = 0; i < N; i++) {
            apples[i] = (i + 1) + baseVal;
        }

        int sum = 0;
        boolean isEat = false;
        for (int i = 0; i < N; i++) {
            int taste = apples[i];
            if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            }
            sum += taste;
        }
        if (!isEat) {
            sum -= apples[N - 1];
        }
        System.out.println(sum);
    }

} import java.util.*; util.* java public class Main {

    public static List<List<Integer>> switchList;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        int baseVal = L - 1;
        int[] apples = new int[N];
        for (int i = 0; i < N; i++) {
            apples[i] = (i + 1) + baseVal;
        }

        int sum = 0;
        boolean isEat = false;
        for (int i = 0; i < N; i++) {
            int taste = apples[i];
            if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            }
            sum += taste;
        }
        if (!isEat) {
            sum -= apples[N - 1];
        }
        System.out.println(sum);
    }

} Main public static List<List<Integer>> switchList; switchList public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        int baseVal = L - 1;
        int[] apples = new int[N];
        for (int i = 0; i < N; i++) {
            apples[i] = (i + 1) + baseVal;
        }

        int sum = 0;
        boolean isEat = false;
        for (int i = 0; i < N; i++) {
            int taste = apples[i];
            if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            }
            sum += taste;
        }
        if (!isEat) {
            sum -= apples[N - 1];
        }
        System.out.println(sum);
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        int baseVal = L - 1;
        int[] apples = new int[N];
        for (int i = 0; i < N; i++) {
            apples[i] = (i + 1) + baseVal;
        }

        int sum = 0;
        boolean isEat = false;
        for (int i = 0; i < N; i++) {
            int taste = apples[i];
            if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            }
            sum += taste;
        }
        if (!isEat) {
            sum -= apples[N - 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 sc.close() sc.close sc int baseVal = L - 1; baseVal L - 1 L 1 int[] apples = new int[N]; apples new int[N] N for (int i = 0; i < N; i++) {
            apples[i] = (i + 1) + baseVal;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            apples[i] = (i + 1) + baseVal;
        } {
            apples[i] = (i + 1) + baseVal;
        } apples[i] = (i + 1) + baseVal apples[i] apples i (i + 1) + baseVal (i + 1) i 1 baseVal int sum = 0; sum 0 boolean isEat = false; isEat false for (int i = 0; i < N; i++) {
            int taste = apples[i];
            if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            }
            sum += taste;
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            int taste = apples[i];
            if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            }
            sum += taste;
        } {
            int taste = apples[i];
            if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            }
            sum += taste;
        } int taste = apples[i]; taste apples[i] apples i if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            } !isEat isEat {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            } if (taste >= 0) {
                    isEat = true;
                    continue;
                } taste >= 0 taste 0 {
                    isEat = true;
                    continue;
                } isEat = true isEat true continue; sum += taste sum taste if (!isEat) {
            sum -= apples[N - 1];
        } !isEat isEat {
            sum -= apples[N - 1];
        } sum -= apples[N - 1] sum apples[N - 1] apples N - 1 N 1 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {

    public static List<List<Integer>> switchList;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        int baseVal = L - 1;
        int[] apples = new int[N];
        for (int i = 0; i < N; i++) {
            apples[i] = (i + 1) + baseVal;
        }

        int sum = 0;
        boolean isEat = false;
        for (int i = 0; i < N; i++) {
            int taste = apples[i];
            if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            }
            sum += taste;
        }
        if (!isEat) {
            sum -= apples[N - 1];
        }
        System.out.println(sum);
    }

} public class Main {

    public static List<List<Integer>> switchList;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        int baseVal = L - 1;
        int[] apples = new int[N];
        for (int i = 0; i < N; i++) {
            apples[i] = (i + 1) + baseVal;
        }

        int sum = 0;
        boolean isEat = false;
        for (int i = 0; i < N; i++) {
            int taste = apples[i];
            if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            }
            sum += taste;
        }
        if (!isEat) {
            sum -= apples[N - 1];
        }
        System.out.println(sum);
    }

} Main
import java.util.*;

public class Main {

    public static List<List<Integer>> switchList;

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        int baseVal = L - 1;
        int[] apples = new int[N];
        for (int i = 0; i < N; i++) {
            apples[i] = (i + 1) + baseVal;
        }

        int sum = 0;
        boolean isEat = false;
        for (int i = 0; i < N; i++) {
            int taste = apples[i];
            if (!isEat) {
                if (taste >= 0) {
                    isEat = true;
                    continue;
                }
            }
            sum += taste;
        }
        if (!isEat) {
            sum -= apples[N - 1];
        }
        System.out.println(sum);
    }

}