// (N * (L + (L + N - 1))) / 2
// (N * (2 * L + N - 1)) / 2
import java.io.*;
// import java.math.*;
// import java.util.*;
// import java.util.Map.*;
// import java.util.stream.*;

public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String[] arr = reader.readLine().split (" ");
        int N, L;
        N = Integer.parseInt (arr[0]);
        L = Integer.parseInt (arr[1]);
        int ans = (N * (2 * L + N - 1)) / 2;
        if (0 < L)
            ans -= L;
        else if (L + N - 1 < 0)
            ans -= L + N - 1;
        System.out.println (ans);
        return;
    }
} import java.io.*; io.* java public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String[] arr = reader.readLine().split (" ");
        int N, L;
        N = Integer.parseInt (arr[0]);
        L = Integer.parseInt (arr[1]);
        int ans = (N * (2 * L + N - 1)) / 2;
        if (0 < L)
            ans -= L;
        else if (L + N - 1 < 0)
            ans -= L + N - 1;
        System.out.println (ans);
        return;
    }
} Main public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String[] arr = reader.readLine().split (" ");
        int N, L;
        N = Integer.parseInt (arr[0]);
        L = Integer.parseInt (arr[1]);
        int ans = (N * (2 * L + N - 1)) / 2;
        if (0 < L)
            ans -= L;
        else if (L + N - 1 < 0)
            ans -= L + N - 1;
        System.out.println (ans);
        return;
    } main {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String[] arr = reader.readLine().split (" ");
        int N, L;
        N = Integer.parseInt (arr[0]);
        L = Integer.parseInt (arr[1]);
        int ans = (N * (2 * L + N - 1)) / 2;
        if (0 < L)
            ans -= L;
        else if (L + N - 1 < 0)
            ans -= L + N - 1;
        System.out.println (ans);
        return;
    } BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in)); reader new BufferedReader (new InputStreamReader (System.in)) String[] arr = reader.readLine().split (" "); arr reader.readLine().split (" ") reader.readLine().split reader.readLine() reader.readLine reader " " int N N L; L N = Integer.parseInt (arr[0]) N Integer.parseInt (arr[0]) Integer.parseInt Integer arr[0] arr 0 L = Integer.parseInt (arr[1]) L Integer.parseInt (arr[1]) Integer.parseInt Integer arr[1] arr 1 int ans = (N * (2 * L + N - 1)) / 2; ans (N * (2 * L + N - 1)) / 2 (N * (2 * L + N - 1)) N (2 * L + N - 1) 2 * L + N 2 * L 2 L N 1 2 if (0 < L)
            ans -= L;
        else if (L + N - 1 < 0)
            ans -= L + N - 1; 0 < L 0 L ans -= L ans L if (L + N - 1 < 0)
            ans -= L + N - 1; L + N - 1 < 0 L + N - 1 L + N L N 1 0 ans -= L + N - 1 ans L + N - 1 L + N L N 1 System.out.println (ans) System.out.println System.out System System.out ans return; String[] args args public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String[] arr = reader.readLine().split (" ");
        int N, L;
        N = Integer.parseInt (arr[0]);
        L = Integer.parseInt (arr[1]);
        int ans = (N * (2 * L + N - 1)) / 2;
        if (0 < L)
            ans -= L;
        else if (L + N - 1 < 0)
            ans -= L + N - 1;
        System.out.println (ans);
        return;
    }
} public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String[] arr = reader.readLine().split (" ");
        int N, L;
        N = Integer.parseInt (arr[0]);
        L = Integer.parseInt (arr[1]);
        int ans = (N * (2 * L + N - 1)) / 2;
        if (0 < L)
            ans -= L;
        else if (L + N - 1 < 0)
            ans -= L + N - 1;
        System.out.println (ans);
        return;
    }
} Main
// (N * (L + (L + N - 1))) / 2
// (N * (2 * L + N - 1)) / 2
import java.io.*;
// import java.math.*;
// import java.util.*;
// import java.util.Map.*;
// import java.util.stream.*;

public class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader reader =
            new BufferedReader (new InputStreamReader (System.in));
        String[] arr = reader.readLine().split (" ");
        int N, L;
        N = Integer.parseInt (arr[0]);
        L = Integer.parseInt (arr[1]);
        int ans = (N * (2 * L + N - 1)) / 2;
        if (0 < L)
            ans -= L;
        else if (L + N - 1 < 0)
            ans -= L + N - 1;
        System.out.println (ans);
        return;
    }
}