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