import java.io.*;
import java.util.*;

public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long L;
        L = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(N, L);
    }
}

class Solver {
    public void solve(long N, long L) {
        long ans = 0;
        long min = Long.MAX_VALUE;
        long minScore = -1;
        for (int i = 0; i < N; i++) {
            long score = L + i;
            ans += score;

            if (min > Math.abs(score)) {
                min = Math.abs(score);
                minScore = score;
            }
        }
        System.out.println(ans - minScore);
    }
}
 import java.io.*; io.* java import java.util.*; util.* java public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long L;
        L = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(N, L);
    }
} Main public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long L;
        L = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(N, L);
    } main {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long L;
        L = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(N, L);
    } final Scanner sc = new Scanner(System.in); sc new Scanner(System.in) long N; N N = sc.nextLong() N sc.nextLong() sc.nextLong sc long L; L L = sc.nextLong() L sc.nextLong() sc.nextLong sc final Solver solver = new Solver(); solver new Solver() solver.solve(N, L) solver.solve solver N L final String[] args args class Solver {
    public void solve(long N, long L) {
        long ans = 0;
        long min = Long.MAX_VALUE;
        long minScore = -1;
        for (int i = 0; i < N; i++) {
            long score = L + i;
            ans += score;

            if (min > Math.abs(score)) {
                min = Math.abs(score);
                minScore = score;
            }
        }
        System.out.println(ans - minScore);
    }
} Solver public void solve(long N, long L) {
        long ans = 0;
        long min = Long.MAX_VALUE;
        long minScore = -1;
        for (int i = 0; i < N; i++) {
            long score = L + i;
            ans += score;

            if (min > Math.abs(score)) {
                min = Math.abs(score);
                minScore = score;
            }
        }
        System.out.println(ans - minScore);
    } solve {
        long ans = 0;
        long min = Long.MAX_VALUE;
        long minScore = -1;
        for (int i = 0; i < N; i++) {
            long score = L + i;
            ans += score;

            if (min > Math.abs(score)) {
                min = Math.abs(score);
                minScore = score;
            }
        }
        System.out.println(ans - minScore);
    } long ans = 0; ans 0 long min = Long.MAX_VALUE; min Long.MAX_VALUE Long Long.MAX_VALUE long minScore = -1; minScore -1 1 for (int i = 0; i < N; i++) {
            long score = L + i;
            ans += score;

            if (min > Math.abs(score)) {
                min = Math.abs(score);
                minScore = score;
            }
        } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
            long score = L + i;
            ans += score;

            if (min > Math.abs(score)) {
                min = Math.abs(score);
                minScore = score;
            }
        } {
            long score = L + i;
            ans += score;

            if (min > Math.abs(score)) {
                min = Math.abs(score);
                minScore = score;
            }
        } long score = L + i; score L + i L i ans += score ans score if (min > Math.abs(score)) {
                min = Math.abs(score);
                minScore = score;
            } min > Math.abs(score) min Math.abs(score) Math.abs Math score {
                min = Math.abs(score);
                minScore = score;
            } min = Math.abs(score) min Math.abs(score) Math.abs Math score minScore = score minScore score System.out.println(ans - minScore) System.out.println System.out System System.out ans - minScore ans minScore long N N long L L public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long L;
        L = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(N, L);
    }
} public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long L;
        L = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(N, L);
    }
} Main
import java.io.*;
import java.util.*;

public class Main {

    public static void main(final String[] args) throws Exception {
        final Scanner sc = new Scanner(System.in);
        long N;
        N = sc.nextLong();
        long L;
        L = sc.nextLong();

        final Solver solver = new Solver();
        solver.solve(N, L);
    }
}

class Solver {
    public void solve(long N, long L) {
        long ans = 0;
        long min = Long.MAX_VALUE;
        long minScore = -1;
        for (int i = 0; i < N; i++) {
            long score = L + i;
            ans += score;

            if (min > Math.abs(score)) {
                min = Math.abs(score);
                minScore = score;
            }
        }
        System.out.println(ans - minScore);
    }
}

