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 min = Integer.MAX_VALUE;
        int eat = 0;
        
        for (int i = 1; i <= n; i++) {
            eat = l + i - 1;
            //System.out.println(min);
            if (Math.abs(eat) < Math.abs(min)) {
                min = eat;
            }
        }
        
        //System.out.println(min);

        for (int i = 1; i <= n; i++) {
            sum += l + i - 1;
        }

        System.out.println(sum - min);

        sc.close();
    }
} 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 min = Integer.MAX_VALUE;
        int eat = 0;
        
        for (int i = 1; i <= n; i++) {
            eat = l + i - 1;
            //System.out.println(min);
            if (Math.abs(eat) < Math.abs(min)) {
                min = eat;
            }
        }
        
        //System.out.println(min);

        for (int i = 1; i <= n; i++) {
            sum += l + i - 1;
        }

        System.out.println(sum - min);

        sc.close();
    }
} 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 min = Integer.MAX_VALUE;
        int eat = 0;
        
        for (int i = 1; i <= n; i++) {
            eat = l + i - 1;
            //System.out.println(min);
            if (Math.abs(eat) < Math.abs(min)) {
                min = eat;
            }
        }
        
        //System.out.println(min);

        for (int i = 1; i <= n; i++) {
            sum += l + i - 1;
        }

        System.out.println(sum - min);

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

        for (int i = 1; i <= n; i++) {
            sum += l + i - 1;
        }

        System.out.println(sum - min);

        sc.close();
    } 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 min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE int eat = 0; eat 0 for (int i = 1; i <= n; i++) {
            eat = l + i - 1;
            //System.out.println(min);
            if (Math.abs(eat) < Math.abs(min)) {
                min = eat;
            }
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            eat = l + i - 1;
            //System.out.println(min);
            if (Math.abs(eat) < Math.abs(min)) {
                min = eat;
            }
        } {
            eat = l + i - 1;
            //System.out.println(min);
            if (Math.abs(eat) < Math.abs(min)) {
                min = eat;
            }
        } eat = l + i - 1 eat l + i - 1 l + i l i 1 if (Math.abs(eat) < Math.abs(min)) {
                min = eat;
            } Math.abs(eat) < Math.abs(min) Math.abs(eat) Math.abs Math eat Math.abs(min) Math.abs Math min {
                min = eat;
            } min = eat min eat for (int i = 1; i <= n; i++) {
            sum += l + i - 1;
        } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
            sum += l + i - 1;
        } {
            sum += l + i - 1;
        } sum += l + i - 1 sum l + i - 1 l + i l i 1 System.out.println(sum - min) System.out.println System.out System System.out sum - min sum min sc.close() sc.close sc 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 min = Integer.MAX_VALUE;
        int eat = 0;
        
        for (int i = 1; i <= n; i++) {
            eat = l + i - 1;
            //System.out.println(min);
            if (Math.abs(eat) < Math.abs(min)) {
                min = eat;
            }
        }
        
        //System.out.println(min);

        for (int i = 1; i <= n; i++) {
            sum += l + i - 1;
        }

        System.out.println(sum - min);

        sc.close();
    }
} 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 min = Integer.MAX_VALUE;
        int eat = 0;
        
        for (int i = 1; i <= n; i++) {
            eat = l + i - 1;
            //System.out.println(min);
            if (Math.abs(eat) < Math.abs(min)) {
                min = eat;
            }
        }
        
        //System.out.println(min);

        for (int i = 1; i <= n; i++) {
            sum += l + i - 1;
        }

        System.out.println(sum - min);

        sc.close();
    }
} 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 min = Integer.MAX_VALUE;
        int eat = 0;
        
        for (int i = 1; i <= n; i++) {
            eat = l + i - 1;
            //System.out.println(min);
            if (Math.abs(eat) < Math.abs(min)) {
                min = eat;
            }
        }
        
        //System.out.println(min);

        for (int i = 1; i <= n; i++) {
            sum += l + i - 1;
        }

        System.out.println(sum - min);

        sc.close();
    }
}