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 min = 300;
    int apl = 0;
    for (int i = 1; i <= n; i++) {
      int t = Math.abs(l + i - 1);
      if (t < min) apl = i;
      min = Math.min(t, min);
    }

    int ans = 0;
    for (int i = 1; i <= n; i++) {
      if (i != apl) ans += l + i - 1;
    }
    
    System.out.println(ans);
  }
} 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 min = 300;
    int apl = 0;
    for (int i = 1; i <= n; i++) {
      int t = Math.abs(l + i - 1);
      if (t < min) apl = i;
      min = Math.min(t, min);
    }

    int ans = 0;
    for (int i = 1; i <= n; i++) {
      if (i != apl) ans += l + i - 1;
    }
    
    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 min = 300;
    int apl = 0;
    for (int i = 1; i <= n; i++) {
      int t = Math.abs(l + i - 1);
      if (t < min) apl = i;
      min = Math.min(t, min);
    }

    int ans = 0;
    for (int i = 1; i <= n; i++) {
      if (i != apl) ans += l + i - 1;
    }
    
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);

    int n = sc.nextInt();
    int l = sc.nextInt();

    int min = 300;
    int apl = 0;
    for (int i = 1; i <= n; i++) {
      int t = Math.abs(l + i - 1);
      if (t < min) apl = i;
      min = Math.min(t, min);
    }

    int ans = 0;
    for (int i = 1; i <= n; i++) {
      if (i != apl) ans += l + i - 1;
    }
    
    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 min = 300; min 300 int apl = 0; apl 0 for (int i = 1; i <= n; i++) {
      int t = Math.abs(l + i - 1);
      if (t < min) apl = i;
      min = Math.min(t, min);
    } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
      int t = Math.abs(l + i - 1);
      if (t < min) apl = i;
      min = Math.min(t, min);
    } {
      int t = Math.abs(l + i - 1);
      if (t < min) apl = i;
      min = Math.min(t, min);
    } int t = Math.abs(l + i - 1); t Math.abs(l + i - 1) Math.abs Math l + i - 1 l + i l i 1 if (t < min) apl = i; t < min t min apl = i apl i min = Math.min(t, min) min Math.min(t, min) Math.min Math t min int ans = 0; ans 0 for (int i = 1; i <= n; i++) {
      if (i != apl) ans += l + i - 1;
    } int i = 1; int i = 1; i 1 i <= n i n i++ i++ i {
      if (i != apl) ans += l + i - 1;
    } {
      if (i != apl) ans += l + i - 1;
    } if (i != apl) ans += l + i - 1; i != apl i apl ans += l + i - 1 ans l + i - 1 l + i l i 1 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 min = 300;
    int apl = 0;
    for (int i = 1; i <= n; i++) {
      int t = Math.abs(l + i - 1);
      if (t < min) apl = i;
      min = Math.min(t, min);
    }

    int ans = 0;
    for (int i = 1; i <= n; i++) {
      if (i != apl) ans += l + i - 1;
    }
    
    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 min = 300;
    int apl = 0;
    for (int i = 1; i <= n; i++) {
      int t = Math.abs(l + i - 1);
      if (t < min) apl = i;
      min = Math.min(t, min);
    }

    int ans = 0;
    for (int i = 1; i <= n; i++) {
      if (i != apl) ans += l + i - 1;
    }
    
    System.out.println(ans);
  }
} 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 min = 300;
    int apl = 0;
    for (int i = 1; i <= n; i++) {
      int t = Math.abs(l + i - 1);
      if (t < min) apl = i;
      min = Math.min(t, min);
    }

    int ans = 0;
    for (int i = 1; i <= n; i++) {
      if (i != apl) ans += l + i - 1;
    }
    
    System.out.println(ans);
  }
}
