import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int l = Integer.parseInt(str[1]);
    int ans = 0;
    int min = Integer.MAX_VALUE;
    for(int i=1; i<=n; i++) {
      ans += l+i-1;
      if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      }
    }
    System.out.println(ans-min);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int l = Integer.parseInt(str[1]);
    int ans = 0;
    int min = Integer.MAX_VALUE;
    for(int i=1; i<=n; i++) {
      ans += l+i-1;
      if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      }
    }
    System.out.println(ans-min);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int l = Integer.parseInt(str[1]);
    int ans = 0;
    int min = Integer.MAX_VALUE;
    for(int i=1; i<=n; i++) {
      ans += l+i-1;
      if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      }
    }
    System.out.println(ans-min);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int l = Integer.parseInt(str[1]);
    int ans = 0;
    int min = Integer.MAX_VALUE;
    for(int i=1; i<=n; i++) {
      ans += l+i-1;
      if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      }
    }
    System.out.println(ans-min);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String[] str = in.readLine().split(" "); str in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " int n = Integer.parseInt(str[0]); n Integer.parseInt(str[0]) Integer.parseInt Integer str[0] str 0 int l = Integer.parseInt(str[1]); l Integer.parseInt(str[1]) Integer.parseInt Integer str[1] str 1 int ans = 0; ans 0 int min = Integer.MAX_VALUE; min Integer.MAX_VALUE Integer Integer.MAX_VALUE for(int i=1; i<=n; i++) {
      ans += l+i-1;
      if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      }
    } int i=1; int i=1; i 1 i<=n i n i++ i++ i {
      ans += l+i-1;
      if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      }
    } {
      ans += l+i-1;
      if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      }
    } ans += l+i-1 ans l+i-1 l+i l i 1 if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      } Math.abs(l+i-1)<Math.abs(min) Math.abs(l+i-1) Math.abs Math l+i-1 l+i l i 1 Math.abs(min) Math.abs Math min {
        min = l+i-1;
      } min = l+i-1 min l+i-1 l+i l i 1 System.out.println(ans-min) System.out.println System.out System System.out ans-min ans min String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int l = Integer.parseInt(str[1]);
    int ans = 0;
    int min = Integer.MAX_VALUE;
    for(int i=1; i<=n; i++) {
      ans += l+i-1;
      if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      }
    }
    System.out.println(ans-min);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int l = Integer.parseInt(str[1]);
    int ans = 0;
    int min = Integer.MAX_VALUE;
    for(int i=1; i<=n; i++) {
      ans += l+i-1;
      if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      }
    }
    System.out.println(ans-min);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String[] str = in.readLine().split(" ");
    int n = Integer.parseInt(str[0]);
    int l = Integer.parseInt(str[1]);
    int ans = 0;
    int min = Integer.MAX_VALUE;
    for(int i=1; i<=n; i++) {
      ans += l+i-1;
      if(Math.abs(l+i-1)<Math.abs(min)) {
        min = l+i-1;
      }
    }
    System.out.println(ans-min);
  }
}