import java.util.Scanner;

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

        int N = sc.nextInt();
        int L = sc.nextInt();
        int sum = calcSum(L, L + N - 1);

        if (L > 0)
            System.out.println(sum - L);
        else if (N + L <= 0 && L <= 0)
            System.out.println(sum - (L + N - 1));
        else
            System.out.println(sum);
        
    }

    static int calcSum(int a, int b) {
        return (a + b) * (b - a + 1) / 2;
    }
} import java.util.Scanner; Scanner 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 sum = calcSum(L, L + N - 1);

        if (L > 0)
            System.out.println(sum - L);
        else if (N + L <= 0 && L <= 0)
            System.out.println(sum - (L + N - 1));
        else
            System.out.println(sum);
        
    }

    static int calcSum(int a, int b) {
        return (a + b) * (b - a + 1) / 2;
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int L = sc.nextInt();
        int sum = calcSum(L, L + N - 1);

        if (L > 0)
            System.out.println(sum - L);
        else if (N + L <= 0 && L <= 0)
            System.out.println(sum - (L + N - 1));
        else
            System.out.println(sum);
        
    } main {
        Scanner sc = new Scanner(System.in);

        int N = sc.nextInt();
        int L = sc.nextInt();
        int sum = calcSum(L, L + N - 1);

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

        int N = sc.nextInt();
        int L = sc.nextInt();
        int sum = calcSum(L, L + N - 1);

        if (L > 0)
            System.out.println(sum - L);
        else if (N + L <= 0 && L <= 0)
            System.out.println(sum - (L + N - 1));
        else
            System.out.println(sum);
        
    }

    static int calcSum(int a, int b) {
        return (a + b) * (b - a + 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();
        int sum = calcSum(L, L + N - 1);

        if (L > 0)
            System.out.println(sum - L);
        else if (N + L <= 0 && L <= 0)
            System.out.println(sum - (L + N - 1));
        else
            System.out.println(sum);
        
    }

    static int calcSum(int a, int b) {
        return (a + b) * (b - a + 1) / 2;
    }
} Main
import java.util.Scanner;

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

        int N = sc.nextInt();
        int L = sc.nextInt();
        int sum = calcSum(L, L + N - 1);

        if (L > 0)
            System.out.println(sum - L);
        else if (N + L <= 0 && L <= 0)
            System.out.println(sum - (L + N - 1));
        else
            System.out.println(sum);
        
    }

    static int calcSum(int a, int b) {
        return (a + b) * (b - a + 1) / 2;
    }
}
