class Main {
    public static void main(String[] args) {
        java.util.Scanner sc = new java.util.Scanner(System.in);

        final int N = sc.nextInt();
        final int L = sc.nextInt();

        int output = 0;

        if (-1 <= L - 1) {
            output -= L;
        } else if (L - 1 <= -N) {
            output -= L + N - 1;
        }

        output += N * (L - 1) + N * (N + 1) / 2;

        System.out.println(output);
    }
} class Main {
    public static void main(String[] args) {
        java.util.Scanner sc = new java.util.Scanner(System.in);

        final int N = sc.nextInt();
        final int L = sc.nextInt();

        int output = 0;

        if (-1 <= L - 1) {
            output -= L;
        } else if (L - 1 <= -N) {
            output -= L + N - 1;
        }

        output += N * (L - 1) + N * (N + 1) / 2;

        System.out.println(output);
    }
} Main public static void main(String[] args) {
        java.util.Scanner sc = new java.util.Scanner(System.in);

        final int N = sc.nextInt();
        final int L = sc.nextInt();

        int output = 0;

        if (-1 <= L - 1) {
            output -= L;
        } else if (L - 1 <= -N) {
            output -= L + N - 1;
        }

        output += N * (L - 1) + N * (N + 1) / 2;

        System.out.println(output);
    } main {
        java.util.Scanner sc = new java.util.Scanner(System.in);

        final int N = sc.nextInt();
        final int L = sc.nextInt();

        int output = 0;

        if (-1 <= L - 1) {
            output -= L;
        } else if (L - 1 <= -N) {
            output -= L + N - 1;
        }

        output += N * (L - 1) + N * (N + 1) / 2;

        System.out.println(output);
    } java.util.Scanner sc = new java.util.Scanner(System.in); sc new java.util.Scanner(System.in) final int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc final int L = sc.nextInt(); L sc.nextInt() sc.nextInt sc int output = 0; output 0 if (-1 <= L - 1) {
            output -= L;
        } else if (L - 1 <= -N) {
            output -= L + N - 1;
        } -1 <= L - 1 -1 1 L - 1 L 1 {
            output -= L;
        } output -= L output L if (L - 1 <= -N) {
            output -= L + N - 1;
        } L - 1 <= -N L - 1 L 1 -N N {
            output -= L + N - 1;
        } output -= L + N - 1 output L + N - 1 L + N L N 1 output += N * (L - 1) + N * (N + 1) / 2 output N * (L - 1) + N * (N + 1) / 2 N * (L - 1) N (L - 1) L 1 N * (N + 1) / 2 N * (N + 1) N (N + 1) N 1 2 System.out.println(output) System.out.println System.out System System.out output String[] args args
class Main {
    public static void main(String[] args) {
        java.util.Scanner sc = new java.util.Scanner(System.in);

        final int N = sc.nextInt();
        final int L = sc.nextInt();

        int output = 0;

        if (-1 <= L - 1) {
            output -= L;
        } else if (L - 1 <= -N) {
            output -= L + N - 1;
        }

        output += N * (L - 1) + N * (N + 1) / 2;

        System.out.println(output);
    }
}