import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int l = input.nextInt();

        int sum = 0;
        int ex = 0;

        for (int i = 1; i <= n; i++) {
        	sum += i;
        }

        if (l - 1 >= 0) {
        	ex = 1;
        } else if (l - 1 <= n * (-1)) {
        	ex = n;
        } else {
        	ex = 1 - l;
        }

        sum -= ex;

        int ans = (n - 1) * (l - 1) + sum;

        System.out.println(ans);

    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int l = input.nextInt();

        int sum = 0;
        int ex = 0;

        for (int i = 1; i <= n; i++) {
        	sum += i;
        }

        if (l - 1 >= 0) {
        	ex = 1;
        } else if (l - 1 <= n * (-1)) {
        	ex = n;
        } else {
        	ex = 1 - l;
        }

        sum -= ex;

        int ans = (n - 1) * (l - 1) + sum;

        System.out.println(ans);

    }
} Main public static void main(String[] args) {
        solve();
    } main {
        solve();
    } solve() solve String[] args args private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int l = input.nextInt();

        int sum = 0;
        int ex = 0;

        for (int i = 1; i <= n; i++) {
        	sum += i;
        }

        if (l - 1 >= 0) {
        	ex = 1;
        } else if (l - 1 <= n * (-1)) {
        	ex = n;
        } else {
        	ex = 1 - l;
        }

        sum -= ex;

        int ans = (n - 1) * (l - 1) + sum;

        System.out.println(ans);

    } solve {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int l = input.nextInt();

        int sum = 0;
        int ex = 0;

        for (int i = 1; i <= n; i++) {
        	sum += i;
        }

        if (l - 1 >= 0) {
        	ex = 1;
        } else if (l - 1 <= n * (-1)) {
        	ex = n;
        } else {
        	ex = 1 - l;
        }

        sum -= ex;

        int ans = (n - 1) * (l - 1) + sum;

        System.out.println(ans);

    } Scanner input = new Scanner(System.in); input new Scanner(System.in) int n = input.nextInt(); n input.nextInt() input.nextInt input int l = input.nextInt(); l input.nextInt() input.nextInt input int sum = 0; sum 0 int ex = 0; ex 0 for (int i = 1; i <= n; i++) {
        	sum += i;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
        	sum += i;
        } {
        	sum += i;
        } sum += i sum i if (l - 1 >= 0) {
        	ex = 1;
        } else if (l - 1 <= n * (-1)) {
        	ex = n;
        } else {
        	ex = 1 - l;
        } l - 1 >= 0 l - 1 l 1 0 {
        	ex = 1;
        } ex = 1 ex 1 if (l - 1 <= n * (-1)) {
        	ex = n;
        } else {
        	ex = 1 - l;
        } l - 1 <= n * (-1) l - 1 l 1 n * (-1) n (-1) 1 {
        	ex = n;
        } ex = n ex n {
        	ex = 1 - l;
        } ex = 1 - l ex 1 - l 1 l sum -= ex sum ex int ans = (n - 1) * (l - 1) + sum; ans (n - 1) * (l - 1) + sum (n - 1) * (l - 1) (n - 1) n 1 (l - 1) l 1 sum System.out.println(ans) System.out.println System.out System System.out ans public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int l = input.nextInt();

        int sum = 0;
        int ex = 0;

        for (int i = 1; i <= n; i++) {
        	sum += i;
        }

        if (l - 1 >= 0) {
        	ex = 1;
        } else if (l - 1 <= n * (-1)) {
        	ex = n;
        } else {
        	ex = 1 - l;
        }

        sum -= ex;

        int ans = (n - 1) * (l - 1) + sum;

        System.out.println(ans);

    }
} public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int l = input.nextInt();

        int sum = 0;
        int ex = 0;

        for (int i = 1; i <= n; i++) {
        	sum += i;
        }

        if (l - 1 >= 0) {
        	ex = 1;
        } else if (l - 1 <= n * (-1)) {
        	ex = n;
        } else {
        	ex = 1 - l;
        }

        sum -= ex;

        int ans = (n - 1) * (l - 1) + sum;

        System.out.println(ans);

    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        solve();
    }

    private static void solve() {
        Scanner input = new Scanner(System.in);

        int n = input.nextInt();
        int l = input.nextInt();

        int sum = 0;
        int ex = 0;

        for (int i = 1; i <= n; i++) {
        	sum += i;
        }

        if (l - 1 >= 0) {
        	ex = 1;
        } else if (l - 1 <= n * (-1)) {
        	ex = n;
        } else {
        	ex = 1 - l;
        }

        sum -= ex;

        int ans = (n - 1) * (l - 1) + sum;

        System.out.println(ans);

    }
}
