import java.io.*;
import java.lang.*;

class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strs = br.readLine().split(" ");
    int N = Integer.parseInt(strs[0]);
    int L = Integer.parseInt(strs[1]);
    int sum = 0, asymptote = 0;
    
    for (int i=1; i <= N; i++) {
      if (i == 1) {
        asymptote = (L+i-1) > -1 ? 999 : -999;
      }
      
      if ((L+i-1) > -1 && asymptote > -1) {
        asymptote = Math.min(asymptote, (L+i-1));
      } else {
        asymptote = Math.max(asymptote, (L+i-1));
      }
      sum += (L+i-1);
    }
    System.out.println(sum - asymptote);
  }
} import java.io.*; io.* java import java.lang.*; lang.* java class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strs = br.readLine().split(" ");
    int N = Integer.parseInt(strs[0]);
    int L = Integer.parseInt(strs[1]);
    int sum = 0, asymptote = 0;
    
    for (int i=1; i <= N; i++) {
      if (i == 1) {
        asymptote = (L+i-1) > -1 ? 999 : -999;
      }
      
      if ((L+i-1) > -1 && asymptote > -1) {
        asymptote = Math.min(asymptote, (L+i-1));
      } else {
        asymptote = Math.max(asymptote, (L+i-1));
      }
      sum += (L+i-1);
    }
    System.out.println(sum - asymptote);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strs = br.readLine().split(" ");
    int N = Integer.parseInt(strs[0]);
    int L = Integer.parseInt(strs[1]);
    int sum = 0, asymptote = 0;
    
    for (int i=1; i <= N; i++) {
      if (i == 1) {
        asymptote = (L+i-1) > -1 ? 999 : -999;
      }
      
      if ((L+i-1) > -1 && asymptote > -1) {
        asymptote = Math.min(asymptote, (L+i-1));
      } else {
        asymptote = Math.max(asymptote, (L+i-1));
      }
      sum += (L+i-1);
    }
    System.out.println(sum - asymptote);
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strs = br.readLine().split(" ");
    int N = Integer.parseInt(strs[0]);
    int L = Integer.parseInt(strs[1]);
    int sum = 0, asymptote = 0;
    
    for (int i=1; i <= N; i++) {
      if (i == 1) {
        asymptote = (L+i-1) > -1 ? 999 : -999;
      }
      
      if ((L+i-1) > -1 && asymptote > -1) {
        asymptote = Math.min(asymptote, (L+i-1));
      } else {
        asymptote = Math.max(asymptote, (L+i-1));
      }
      sum += (L+i-1);
    }
    System.out.println(sum - asymptote);
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] strs = br.readLine().split(" "); strs br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int N = Integer.parseInt(strs[0]); N Integer.parseInt(strs[0]) Integer.parseInt Integer strs[0] strs 0 int L = Integer.parseInt(strs[1]); L Integer.parseInt(strs[1]) Integer.parseInt Integer strs[1] strs 1 int sum = 0 sum 0 asymptote = 0; asymptote 0 for (int i=1; i <= N; i++) {
      if (i == 1) {
        asymptote = (L+i-1) > -1 ? 999 : -999;
      }
      
      if ((L+i-1) > -1 && asymptote > -1) {
        asymptote = Math.min(asymptote, (L+i-1));
      } else {
        asymptote = Math.max(asymptote, (L+i-1));
      }
      sum += (L+i-1);
    } int i=1; int i=1; i 1 i <= N i N i++ i++ i {
      if (i == 1) {
        asymptote = (L+i-1) > -1 ? 999 : -999;
      }
      
      if ((L+i-1) > -1 && asymptote > -1) {
        asymptote = Math.min(asymptote, (L+i-1));
      } else {
        asymptote = Math.max(asymptote, (L+i-1));
      }
      sum += (L+i-1);
    } {
      if (i == 1) {
        asymptote = (L+i-1) > -1 ? 999 : -999;
      }
      
      if ((L+i-1) > -1 && asymptote > -1) {
        asymptote = Math.min(asymptote, (L+i-1));
      } else {
        asymptote = Math.max(asymptote, (L+i-1));
      }
      sum += (L+i-1);
    } if (i == 1) {
        asymptote = (L+i-1) > -1 ? 999 : -999;
      } i == 1 i 1 {
        asymptote = (L+i-1) > -1 ? 999 : -999;
      } asymptote = (L+i-1) > -1 ? 999 : -999 asymptote (L+i-1) > -1 ? 999 : -999 (L+i-1) > -1 (L+i-1) L+i L i 1 -1 1 999 -999 999 if ((L+i-1) > -1 && asymptote > -1) {
        asymptote = Math.min(asymptote, (L+i-1));
      } else {
        asymptote = Math.max(asymptote, (L+i-1));
      } (L+i-1) > -1 && asymptote > -1 (L+i-1) > -1 (L+i-1) L+i L i 1 -1 1 asymptote > -1 asymptote -1 1 {
        asymptote = Math.min(asymptote, (L+i-1));
      } asymptote = Math.min(asymptote, (L+i-1)) asymptote Math.min(asymptote, (L+i-1)) Math.min Math asymptote (L+i-1) L+i L i 1 {
        asymptote = Math.max(asymptote, (L+i-1));
      } asymptote = Math.max(asymptote, (L+i-1)) asymptote Math.max(asymptote, (L+i-1)) Math.max Math asymptote (L+i-1) L+i L i 1 sum += (L+i-1) sum (L+i-1) L+i L i 1 System.out.println(sum - asymptote) System.out.println System.out System System.out sum - asymptote sum asymptote String[] args args
import java.io.*;
import java.lang.*;

class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] strs = br.readLine().split(" ");
    int N = Integer.parseInt(strs[0]);
    int L = Integer.parseInt(strs[1]);
    int sum = 0, asymptote = 0;
    
    for (int i=1; i <= N; i++) {
      if (i == 1) {
        asymptote = (L+i-1) > -1 ? 999 : -999;
      }
      
      if ((L+i-1) > -1 && asymptote > -1) {
        asymptote = Math.min(asymptote, (L+i-1));
      } else {
        asymptote = Math.max(asymptote, (L+i-1));
      }
      sum += (L+i-1);
    }
    System.out.println(sum - asymptote);
  }
}