import java.util.Scanner;

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

            int sum = 0;
            for (int i = 0; i < N; i++) {
                sum += L + i;
            }

            int min = (int) 1e9;
            for (int i = 0; i < N; i++) {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            }

            System.out.println(sum - min);
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int L = in.nextInt();

            int sum = 0;
            for (int i = 0; i < N; i++) {
                sum += L + i;
            }

            int min = (int) 1e9;
            for (int i = 0; i < N; i++) {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            }

            System.out.println(sum - min);
        }
    }
} Main public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int L = in.nextInt();

            int sum = 0;
            for (int i = 0; i < N; i++) {
                sum += L + i;
            }

            int min = (int) 1e9;
            for (int i = 0; i < N; i++) {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            }

            System.out.println(sum - min);
        }
    } main {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int L = in.nextInt();

            int sum = 0;
            for (int i = 0; i < N; i++) {
                sum += L + i;
            }

            int min = (int) 1e9;
            for (int i = 0; i < N; i++) {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            }

            System.out.println(sum - min);
        }
    } try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int L = in.nextInt();

            int sum = 0;
            for (int i = 0; i < N; i++) {
                sum += L + i;
            }

            int min = (int) 1e9;
            for (int i = 0; i < N; i++) {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            }

            System.out.println(sum - min);
        } {
            int N = in.nextInt();
            int L = in.nextInt();

            int sum = 0;
            for (int i = 0; i < N; i++) {
                sum += L + i;
            }

            int min = (int) 1e9;
            for (int i = 0; i < N; i++) {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            }

            System.out.println(sum - min);
        } Scanner in = new Scanner(System.in) Scanner in = new Scanner(System.in) new Scanner(System.in) int N = in.nextInt(); N in.nextInt() in.nextInt in int L = in.nextInt(); L in.nextInt() in.nextInt in int sum = 0; sum 0 for (int i = 0; i < N; i++) {
                sum += L + i;
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                sum += L + i;
            } {
                sum += L + i;
            } sum += L + i sum L + i L i int min = (int) 1e9; min (int) 1e9 for (int i = 0; i < N; i++) {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            } {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            } if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                } Math.abs(L + i) < Math.abs(min) Math.abs(L + i) Math.abs Math L + i L i Math.abs(min) Math.abs Math min {
                    min = L + i;
                } min = L + i min L + i L i System.out.println(sum - min) System.out.println System.out System System.out sum - min sum min String[] args args public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int L = in.nextInt();

            int sum = 0;
            for (int i = 0; i < N; i++) {
                sum += L + i;
            }

            int min = (int) 1e9;
            for (int i = 0; i < N; i++) {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            }

            System.out.println(sum - min);
        }
    }
} public class Main {
    public static void main(String[] args) {
        try (Scanner in = new Scanner(System.in)) {
            int N = in.nextInt();
            int L = in.nextInt();

            int sum = 0;
            for (int i = 0; i < N; i++) {
                sum += L + i;
            }

            int min = (int) 1e9;
            for (int i = 0; i < N; i++) {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            }

            System.out.println(sum - min);
        }
    }
} Main
import java.util.Scanner;

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

            int sum = 0;
            for (int i = 0; i < N; i++) {
                sum += L + i;
            }

            int min = (int) 1e9;
            for (int i = 0; i < N; i++) {
                if (Math.abs(L + i) < Math.abs(min)) {
                    min = L + i;
                }
            }

            System.out.println(sum - min);
        }
    }
}
