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[] ll = new int[n];
        int min = Integer.MAX_VALUE;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            ll[i] = l + i - 1 + 1;
            int lll = Math.abs(ll[i]);
            if(min > lll) {
                min = lll;
                tmp = i;
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if(!(i == tmp)) {
                ans += ll[i];
            }
        }
        System.out.println(ans);
    }
} 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[] ll = new int[n];
        int min = Integer.MAX_VALUE;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            ll[i] = l + i - 1 + 1;
            int lll = Math.abs(ll[i]);
            if(min > lll) {
                min = lll;
                tmp = i;
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if(!(i == tmp)) {
                ans += ll[i];
            }
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] ll = new int[n];
        int min = Integer.MAX_VALUE;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            ll[i] = l + i - 1 + 1;
            int lll = Math.abs(ll[i]);
            if(min > lll) {
                min = lll;
                tmp = i;
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if(!(i == tmp)) {
                ans += ll[i];
            }
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] ll = new int[n];
        int min = Integer.MAX_VALUE;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            ll[i] = l + i - 1 + 1;
            int lll = Math.abs(ll[i]);
            if(min > lll) {
                min = lll;
                tmp = i;
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if(!(i == tmp)) {
                ans += ll[i];
            }
        }
        System.out.println(ans);
    } 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[] ll = new int[n]; ll new int[n] n int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int tmp = 0; tmp 0 for (int i = 0; i < n; i++) {
            ll[i] = l + i - 1 + 1;
            int lll = Math.abs(ll[i]);
            if(min > lll) {
                min = lll;
                tmp = i;
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            ll[i] = l + i - 1 + 1;
            int lll = Math.abs(ll[i]);
            if(min > lll) {
                min = lll;
                tmp = i;
            }
        } {
            ll[i] = l + i - 1 + 1;
            int lll = Math.abs(ll[i]);
            if(min > lll) {
                min = lll;
                tmp = i;
            }
        } ll[i] = l + i - 1 + 1 ll[i] ll i l + i - 1 + 1 l + i - 1 l + i l i 1 1 int lll = Math.abs(ll[i]); lll Math.abs(ll[i]) Math.abs Math ll[i] ll i if(min > lll) {
                min = lll;
                tmp = i;
            } min > lll min lll {
                min = lll;
                tmp = i;
            } min = lll min lll tmp = i tmp i int ans = 0; ans 0 for (int i = 0; i < n; i++) {
            if(!(i == tmp)) {
                ans += ll[i];
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            if(!(i == tmp)) {
                ans += ll[i];
            }
        } {
            if(!(i == tmp)) {
                ans += ll[i];
            }
        } if(!(i == tmp)) {
                ans += ll[i];
            } !(i == tmp) (i == tmp) i tmp {
                ans += ll[i];
            } ans += ll[i] ans ll[i] ll i System.out.println(ans) System.out.println System.out System System.out ans 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[] ll = new int[n];
        int min = Integer.MAX_VALUE;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            ll[i] = l + i - 1 + 1;
            int lll = Math.abs(ll[i]);
            if(min > lll) {
                min = lll;
                tmp = i;
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if(!(i == tmp)) {
                ans += ll[i];
            }
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int l = sc.nextInt();
        int[] ll = new int[n];
        int min = Integer.MAX_VALUE;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            ll[i] = l + i - 1 + 1;
            int lll = Math.abs(ll[i]);
            if(min > lll) {
                min = lll;
                tmp = i;
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if(!(i == tmp)) {
                ans += ll[i];
            }
        }
        System.out.println(ans);
    }
} 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[] ll = new int[n];
        int min = Integer.MAX_VALUE;
        int tmp = 0;
        for (int i = 0; i < n; i++) {
            ll[i] = l + i - 1 + 1;
            int lll = Math.abs(ll[i]);
            if(min > lll) {
                min = lll;
                tmp = i;
            }
        }
        int ans = 0;
        for (int i = 0; i < n; i++) {
            if(!(i == tmp)) {
                ans += ll[i];
            }
        }
        System.out.println(ans);
    }
}