import 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 total = n*(l-1)+n*(n+1)/2;
        if (0<l)total-=l;
        else if (-n>=l)total-=l+n-1;
        System.out.println(total);

    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int total = n*(l-1)+n*(n+1)/2;
        if (0<l)total-=l;
        else if (-n>=l)total-=l+n-1;
        System.out.println(total);

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int total = n*(l-1)+n*(n+1)/2;
        if (0<l)total-=l;
        else if (-n>=l)total-=l+n-1;
        System.out.println(total);

    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int total = n*(l-1)+n*(n+1)/2;
        if (0<l)total-=l;
        else if (-n>=l)total-=l+n-1;
        System.out.println(total);

    } 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 total = n*(l-1)+n*(n+1)/2; total n*(l-1)+n*(n+1)/2 n*(l-1) n (l-1) l 1 n*(n+1)/2 n*(n+1) n (n+1) n 1 2 if (0<l)total-=l;
        else if (-n>=l)total-=l+n-1; 0<l 0 l total-=l total l if (-n>=l)total-=l+n-1; -n>=l -n n l total-=l+n-1 total l+n-1 l+n l n 1 System.out.println(total) System.out.println System.out System System.out total 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 total = n*(l-1)+n*(n+1)/2;
        if (0<l)total-=l;
        else if (-n>=l)total-=l+n-1;
        System.out.println(total);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int total = n*(l-1)+n*(n+1)/2;
        if (0<l)total-=l;
        else if (-n>=l)total-=l+n-1;
        System.out.println(total);

    }
} Main
import 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 total = n*(l-1)+n*(n+1)/2;
        if (0<l)total-=l;
        else if (-n>=l)total-=l+n-1;
        System.out.println(total);

    }
}
