
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = in.nextInt();
        final int l = in.nextInt();

        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum += l + i;
        }
        if (l >= 0) {
            sum -= l;
            System.out.println(sum);
        } else {
            if (l + n - 1 >= 0) {
                System.out.println(sum);
            } else {
                sum -= l + n - 1;
                System.out.println(sum);
            }
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = in.nextInt();
        final int l = in.nextInt();

        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum += l + i;
        }
        if (l >= 0) {
            sum -= l;
            System.out.println(sum);
        } else {
            if (l + n - 1 >= 0) {
                System.out.println(sum);
            } else {
                sum -= l + n - 1;
                System.out.println(sum);
            }
        }
    }
} Main public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = in.nextInt();
        final int l = in.nextInt();

        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum += l + i;
        }
        if (l >= 0) {
            sum -= l;
            System.out.println(sum);
        } else {
            if (l + n - 1 >= 0) {
                System.out.println(sum);
            } else {
                sum -= l + n - 1;
                System.out.println(sum);
            }
        }
    } main {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = in.nextInt();
        final int l = in.nextInt();

        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum += l + i;
        }
        if (l >= 0) {
            sum -= l;
            System.out.println(sum);
        } else {
            if (l + n - 1 >= 0) {
                System.out.println(sum);
            } else {
                sum -= l + n - 1;
                System.out.println(sum);
            }
        }
    } final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in))); in new Scanner(new BufferedReader(new InputStreamReader(System.in))) final int n = in.nextInt(); n in.nextInt() in.nextInt in final 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 if (l >= 0) {
            sum -= l;
            System.out.println(sum);
        } else {
            if (l + n - 1 >= 0) {
                System.out.println(sum);
            } else {
                sum -= l + n - 1;
                System.out.println(sum);
            }
        } l >= 0 l 0 {
            sum -= l;
            System.out.println(sum);
        } sum -= l sum l System.out.println(sum) System.out.println System.out System System.out sum {
            if (l + n - 1 >= 0) {
                System.out.println(sum);
            } else {
                sum -= l + n - 1;
                System.out.println(sum);
            }
        } if (l + n - 1 >= 0) {
                System.out.println(sum);
            } else {
                sum -= l + n - 1;
                System.out.println(sum);
            } l + n - 1 >= 0 l + n - 1 l + n l n 1 0 {
                System.out.println(sum);
            } System.out.println(sum) System.out.println System.out System System.out sum {
                sum -= l + n - 1;
                System.out.println(sum);
            } 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 public class Main {
    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = in.nextInt();
        final int l = in.nextInt();

        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum += l + i;
        }
        if (l >= 0) {
            sum -= l;
            System.out.println(sum);
        } else {
            if (l + n - 1 >= 0) {
                System.out.println(sum);
            } else {
                sum -= l + n - 1;
                System.out.println(sum);
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = in.nextInt();
        final int l = in.nextInt();

        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum += l + i;
        }
        if (l >= 0) {
            sum -= l;
            System.out.println(sum);
        } else {
            if (l + n - 1 >= 0) {
                System.out.println(sum);
            } else {
                sum -= l + n - 1;
                System.out.println(sum);
            }
        }
    }
} Main

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        final Scanner in = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
        final int n = in.nextInt();
        final int l = in.nextInt();

        int sum = 0;
        for (int i = 0; i < n; i++) {
            sum += l + i;
        }
        if (l >= 0) {
            sum -= l;
            System.out.println(sum);
        } else {
            if (l + n - 1 >= 0) {
                System.out.println(sum);
            } else {
                sum -= l + n - 1;
                System.out.println(sum);
            }
        }
    }
}
