import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        sc.close();

        int all = 0;
        int min = Integer.MAX_VALUE;
        int eat = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int taste = l + (i + 1) - 1;
//            System.out.println(taste);
            all += taste;
            if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            }
        }
//        System.out.println(all);
        System.out.println(all - eat);
    }

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

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        sc.close();

        int all = 0;
        int min = Integer.MAX_VALUE;
        int eat = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int taste = l + (i + 1) - 1;
//            System.out.println(taste);
            all += taste;
            if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            }
        }
//        System.out.println(all);
        System.out.println(all - eat);
    }

} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        sc.close();

        int all = 0;
        int min = Integer.MAX_VALUE;
        int eat = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int taste = l + (i + 1) - 1;
//            System.out.println(taste);
            all += taste;
            if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            }
        }
//        System.out.println(all);
        System.out.println(all - eat);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        sc.close();

        int all = 0;
        int min = Integer.MAX_VALUE;
        int eat = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int taste = l + (i + 1) - 1;
//            System.out.println(taste);
            all += taste;
            if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            }
        }
//        System.out.println(all);
        System.out.println(all - eat);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int l = sc.nextInt(); l sc.nextInt() sc.nextInt sc sc.close() sc.close sc int all = 0; all 0 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int eat = Integer.MAX_VALUE; eat Integer.MAX_VALUE Integer Integer.MAX_VALUE for (int i = 0; i < n; i++) {
            int taste = l + (i + 1) - 1;
//            System.out.println(taste);
            all += taste;
            if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            int taste = l + (i + 1) - 1;
//            System.out.println(taste);
            all += taste;
            if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            }
        } {
            int taste = l + (i + 1) - 1;
//            System.out.println(taste);
            all += taste;
            if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            }
        } int taste = l + (i + 1) - 1; taste l + (i + 1) - 1 l + (i + 1) l (i + 1) i 1 1 all += taste all taste if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            } Math.abs(taste) < min Math.abs(taste) Math.abs Math taste min {
                min = Math.abs(taste);
                eat = taste;
            } min = Math.abs(taste) min Math.abs(taste) Math.abs Math taste eat = taste eat taste System.out.println(all - eat) System.out.println System.out System System.out all - eat all eat String[] args args public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        sc.close();

        int all = 0;
        int min = Integer.MAX_VALUE;
        int eat = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int taste = l + (i + 1) - 1;
//            System.out.println(taste);
            all += taste;
            if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            }
        }
//        System.out.println(all);
        System.out.println(all - eat);
    }

} public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        sc.close();

        int all = 0;
        int min = Integer.MAX_VALUE;
        int eat = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int taste = l + (i + 1) - 1;
//            System.out.println(taste);
            all += taste;
            if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            }
        }
//        System.out.println(all);
        System.out.println(all - eat);
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        sc.close();

        int all = 0;
        int min = Integer.MAX_VALUE;
        int eat = Integer.MAX_VALUE;
        for (int i = 0; i < n; i++) {
            int taste = l + (i + 1) - 1;
//            System.out.println(taste);
            all += taste;
            if (Math.abs(taste) < min) {
                min = Math.abs(taste);
                eat = taste;
            }
        }
//        System.out.println(all);
        System.out.println(all - eat);
    }

}
