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 ans;
    if (L > 0) {
      ans = sum(2, N, L);
    } else if (L+N-1 < 0) {
      ans = sum(1, N-1, L);
    } else {
      ans = sum(1, N, L);
    }
    
    System.out.println(ans);
  }
  
  private static int sum(int start, int end, int L) {
    int ret = 0;
    for (int i = start; i <= end; i++) {
      ret += L+i-1;
    }
    return ret;
  }
} 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 ans;
    if (L > 0) {
      ans = sum(2, N, L);
    } else if (L+N-1 < 0) {
      ans = sum(1, N-1, L);
    } else {
      ans = sum(1, N, L);
    }
    
    System.out.println(ans);
  }
  
  private static int sum(int start, int end, int L) {
    int ret = 0;
    for (int i = start; i <= end; i++) {
      ret += L+i-1;
    }
    return ret;
  }
} Main public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    
    int ans;
    if (L > 0) {
      ans = sum(2, N, L);
    } else if (L+N-1 < 0) {
      ans = sum(1, N-1, L);
    } else {
      ans = sum(1, N, L);
    }
    
    System.out.println(ans);
  } main {

    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    
    int ans;
    if (L > 0) {
      ans = sum(2, N, L);
    } else if (L+N-1 < 0) {
      ans = sum(1, N-1, L);
    } else {
      ans = sum(1, N, L);
    }
    
    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 ans; ans if (L > 0) {
      ans = sum(2, N, L);
    } else if (L+N-1 < 0) {
      ans = sum(1, N-1, L);
    } else {
      ans = sum(1, N, L);
    } L > 0 L 0 {
      ans = sum(2, N, L);
    } ans = sum(2, N, L) ans sum(2, N, L) sum 2 N L if (L+N-1 < 0) {
      ans = sum(1, N-1, L);
    } else {
      ans = sum(1, N, L);
    } L+N-1 < 0 L+N-1 L+N L N 1 0 {
      ans = sum(1, N-1, L);
    } ans = sum(1, N-1, L) ans sum(1, N-1, L) sum 1 N-1 N 1 L {
      ans = sum(1, N, L);
    } ans = sum(1, N, L) ans sum(1, N, L) sum 1 N L System.out.println(ans) System.out.println System.out System System.out ans String[] args args private static int sum(int start, int end, int L) {
    int ret = 0;
    for (int i = start; i <= end; i++) {
      ret += L+i-1;
    }
    return ret;
  } sum {
    int ret = 0;
    for (int i = start; i <= end; i++) {
      ret += L+i-1;
    }
    return ret;
  } int ret = 0; ret 0 for (int i = start; i <= end; i++) {
      ret += L+i-1;
    } int i = start; int i = start; i start i <= end i end i++ i++ i {
      ret += L+i-1;
    } {
      ret += L+i-1;
    } ret += L+i-1 ret L+i-1 L+i L i 1 return ret; ret int start start int end end int L L public class Main {
  
  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    
    int ans;
    if (L > 0) {
      ans = sum(2, N, L);
    } else if (L+N-1 < 0) {
      ans = sum(1, N-1, L);
    } else {
      ans = sum(1, N, L);
    }
    
    System.out.println(ans);
  }
  
  private static int sum(int start, int end, int L) {
    int ret = 0;
    for (int i = start; i <= end; i++) {
      ret += L+i-1;
    }
    return ret;
  }
} public class Main {
  
  public static void main(String[] args) {

    Scanner sc = new Scanner(System.in);
    int N = sc.nextInt();
    int L = sc.nextInt();
    
    int ans;
    if (L > 0) {
      ans = sum(2, N, L);
    } else if (L+N-1 < 0) {
      ans = sum(1, N-1, L);
    } else {
      ans = sum(1, N, L);
    }
    
    System.out.println(ans);
  }
  
  private static int sum(int start, int end, int L) {
    int ret = 0;
    for (int i = start; i <= end; i++) {
      ret += L+i-1;
    }
    return ret;
  }
} 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 ans;
    if (L > 0) {
      ans = sum(2, N, L);
    } else if (L+N-1 < 0) {
      ans = sum(1, N-1, L);
    } else {
      ans = sum(1, N, L);
    }
    
    System.out.println(ans);
  }
  
  private static int sum(int start, int end, int L) {
    int ret = 0;
    for (int i = start; i <= end; i++) {
      ret += L+i-1;
    }
    return ret;
  }
}
