import java.util.Scanner;

class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int L = scan.nextInt();

        int eat = Integer.MAX_VALUE;
        int sum = 0;
        for (int i = 1; i<=N; i++) {
            int m = L + i -1;
            sum += m;
            if (Math.abs(m) < Math.abs(eat)) {
                eat = m;
            }
        }
        System.out.println(sum - eat);
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int L = scan.nextInt();

        int eat = Integer.MAX_VALUE;
        int sum = 0;
        for (int i = 1; i<=N; i++) {
            int m = L + i -1;
            sum += m;
            if (Math.abs(m) < Math.abs(eat)) {
                eat = m;
            }
        }
        System.out.println(sum - eat);
    }
} Main public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int L = scan.nextInt();

        int eat = Integer.MAX_VALUE;
        int sum = 0;
        for (int i = 1; i<=N; i++) {
            int m = L + i -1;
            sum += m;
            if (Math.abs(m) < Math.abs(eat)) {
                eat = m;
            }
        }
        System.out.println(sum - eat);
    } main {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int L = scan.nextInt();

        int eat = Integer.MAX_VALUE;
        int sum = 0;
        for (int i = 1; i<=N; i++) {
            int m = L + i -1;
            sum += m;
            if (Math.abs(m) < Math.abs(eat)) {
                eat = m;
            }
        }
        System.out.println(sum - eat);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int L = scan.nextInt(); L scan.nextInt() scan.nextInt scan int eat = Integer.MAX_VALUE; eat Integer.MAX_VALUE Integer Integer.MAX_VALUE int sum = 0; sum 0 for (int i = 1; i<=N; i++) {
            int m = L + i -1;
            sum += m;
            if (Math.abs(m) < Math.abs(eat)) {
                eat = m;
            }
        } int i = 1; int i = 1; i 1 i<=N i N i++ i++ i {
            int m = L + i -1;
            sum += m;
            if (Math.abs(m) < Math.abs(eat)) {
                eat = m;
            }
        } {
            int m = L + i -1;
            sum += m;
            if (Math.abs(m) < Math.abs(eat)) {
                eat = m;
            }
        } int m = L + i -1; m L + i -1 L + i L i 1 sum += m sum m if (Math.abs(m) < Math.abs(eat)) {
                eat = m;
            } Math.abs(m) < Math.abs(eat) Math.abs(m) Math.abs Math m Math.abs(eat) Math.abs Math eat {
                eat = m;
            } eat = m eat m System.out.println(sum - eat) System.out.println System.out System System.out sum - eat sum eat final String[] args args
import java.util.Scanner;

class Main {
    public static void main(final String[] args) {
        Scanner scan = new Scanner(System.in);
        int N = scan.nextInt();
        int L = scan.nextInt();

        int eat = Integer.MAX_VALUE;
        int sum = 0;
        for (int i = 1; i<=N; i++) {
            int m = L + i -1;
            sum += m;
            if (Math.abs(m) < Math.abs(eat)) {
                eat = m;
            }
        }
        System.out.println(sum - eat);
    }
}
