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();
        sc.close();

        System.out.println(BiteEating(N, L, 1));
    }
    public static int BiteEating(int N, int L, int index) {
        int min = L;
        int max = N + L - 1;
        if (min <= 0 && 0 <= max) {
            return N * (L + N + L - 1) / 2;
        } else if (min < 0) {
            return (N - 1) * (L + (N + L - 2)) / 2;
        } else {
            return (N - 1) * ((L + 1) + (N + L - 1)) / 2;
        }
    }
} 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();
        sc.close();

        System.out.println(BiteEating(N, L, 1));
    }
    public static int BiteEating(int N, int L, int index) {
        int min = L;
        int max = N + L - 1;
        if (min <= 0 && 0 <= max) {
            return N * (L + N + L - 1) / 2;
        } else if (min < 0) {
            return (N - 1) * (L + (N + L - 2)) / 2;
        } else {
            return (N - 1) * ((L + 1) + (N + L - 1)) / 2;
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        System.out.println(BiteEating(N, L, 1));
    } main {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        System.out.println(BiteEating(N, L, 1));
    } 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 System.out.println(BiteEating(N, L, 1)) System.out.println System.out System System.out BiteEating(N, L, 1) BiteEating N L 1 String[] args args public static int BiteEating(int N, int L, int index) {
        int min = L;
        int max = N + L - 1;
        if (min <= 0 && 0 <= max) {
            return N * (L + N + L - 1) / 2;
        } else if (min < 0) {
            return (N - 1) * (L + (N + L - 2)) / 2;
        } else {
            return (N - 1) * ((L + 1) + (N + L - 1)) / 2;
        }
    } BiteEating {
        int min = L;
        int max = N + L - 1;
        if (min <= 0 && 0 <= max) {
            return N * (L + N + L - 1) / 2;
        } else if (min < 0) {
            return (N - 1) * (L + (N + L - 2)) / 2;
        } else {
            return (N - 1) * ((L + 1) + (N + L - 1)) / 2;
        }
    } int min = L; min L int max = N + L - 1; max N + L - 1 N + L N L 1 if (min <= 0 && 0 <= max) {
            return N * (L + N + L - 1) / 2;
        } else if (min < 0) {
            return (N - 1) * (L + (N + L - 2)) / 2;
        } else {
            return (N - 1) * ((L + 1) + (N + L - 1)) / 2;
        } min <= 0 && 0 <= max min <= 0 min 0 0 <= max 0 max {
            return N * (L + N + L - 1) / 2;
        } return N * (L + N + L - 1) / 2; N * (L + N + L - 1) / 2 N * (L + N + L - 1) N (L + N + L - 1) L + N + L L + N + L L N L 1 2 if (min < 0) {
            return (N - 1) * (L + (N + L - 2)) / 2;
        } else {
            return (N - 1) * ((L + 1) + (N + L - 1)) / 2;
        } min < 0 min 0 {
            return (N - 1) * (L + (N + L - 2)) / 2;
        } return (N - 1) * (L + (N + L - 2)) / 2; (N - 1) * (L + (N + L - 2)) / 2 (N - 1) * (L + (N + L - 2)) (N - 1) N 1 (L + (N + L - 2)) L (N + L - 2) N + L N L 2 2 {
            return (N - 1) * ((L + 1) + (N + L - 1)) / 2;
        } return (N - 1) * ((L + 1) + (N + L - 1)) / 2; (N - 1) * ((L + 1) + (N + L - 1)) / 2 (N - 1) * ((L + 1) + (N + L - 1)) (N - 1) N 1 ((L + 1) + (N + L - 1)) (L + 1) L 1 (N + L - 1) N + L N L 1 2 int N N int L L int index index public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        System.out.println(BiteEating(N, L, 1));
    }
    public static int BiteEating(int N, int L, int index) {
        int min = L;
        int max = N + L - 1;
        if (min <= 0 && 0 <= max) {
            return N * (L + N + L - 1) / 2;
        } else if (min < 0) {
            return (N - 1) * (L + (N + L - 2)) / 2;
        } else {
            return (N - 1) * ((L + 1) + (N + L - 1)) / 2;
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        int L = sc.nextInt();
        sc.close();

        System.out.println(BiteEating(N, L, 1));
    }
    public static int BiteEating(int N, int L, int index) {
        int min = L;
        int max = N + L - 1;
        if (min <= 0 && 0 <= max) {
            return N * (L + N + L - 1) / 2;
        } else if (min < 0) {
            return (N - 1) * (L + (N + L - 2)) / 2;
        } else {
            return (N - 1) * ((L + 1) + (N + L - 1)) / 2;
        }
    }
} 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();
        sc.close();

        System.out.println(BiteEating(N, L, 1));
    }
    public static int BiteEating(int N, int L, int index) {
        int min = L;
        int max = N + L - 1;
        if (min <= 0 && 0 <= max) {
            return N * (L + N + L - 1) / 2;
        } else if (min < 0) {
            return (N - 1) * (L + (N + L - 2)) / 2;
        } else {
            return (N - 1) * ((L + 1) + (N + L - 1)) / 2;
        }
    }
}
