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, total =0;
    for (int i=1; i<=N; i++) {
      total += L + i -1;
    }
    if (L >= 0) {
      System.out.println(total - L);
    } else if (L < 0) {
      if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      }
    }
  }
} 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, total =0;
    for (int i=1; i<=N; i++) {
      total += L + i -1;
    }
    if (L >= 0) {
      System.out.println(total - L);
    } else if (L < 0) {
      if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      }
    }
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in) ;
    int N = sc.nextInt();
    int L = sc.nextInt();
    int min =300, total =0;
    for (int i=1; i<=N; i++) {
      total += L + i -1;
    }
    if (L >= 0) {
      System.out.println(total - L);
    } else if (L < 0) {
      if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      }
    }
  } main {
    Scanner sc = new Scanner(System.in) ;
    int N = sc.nextInt();
    int L = sc.nextInt();
    int min =300, total =0;
    for (int i=1; i<=N; i++) {
      total += L + i -1;
    }
    if (L >= 0) {
      System.out.println(total - L);
    } else if (L < 0) {
      if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      }
    }
  } 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 total =0; total 0 for (int i=1; i<=N; i++) {
      total += L + i -1;
    } int i=1; int i=1; i 1 i<=N i N i++ i++ i {
      total += L + i -1;
    } {
      total += L + i -1;
    } total += L + i -1 total L + i -1 L + i L i 1 if (L >= 0) {
      System.out.println(total - L);
    } else if (L < 0) {
      if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      }
    } L >= 0 L 0 {
      System.out.println(total - L);
    } System.out.println(total - L) System.out.println System.out System System.out total - L total L if (L < 0) {
      if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      }
    } L < 0 L 0 {
      if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      }
    } if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      } L + N > 0 L + N L N 0 {
        System.out.println(total);
      } System.out.println(total) System.out.println System.out System System.out total {
        System.out.println(total - (L + N - 1));
      } System.out.println(total - (L + N - 1)) System.out.println System.out System System.out total - (L + N - 1) total (L + N - 1) L + N L N 1 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, total =0;
    for (int i=1; i<=N; i++) {
      total += L + i -1;
    }
    if (L >= 0) {
      System.out.println(total - L);
    } else if (L < 0) {
      if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      }
    }
  }
} 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, total =0;
    for (int i=1; i<=N; i++) {
      total += L + i -1;
    }
    if (L >= 0) {
      System.out.println(total - L);
    } else if (L < 0) {
      if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      }
    }
  }
} 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, total =0;
    for (int i=1; i<=N; i++) {
      total += L + i -1;
    }
    if (L >= 0) {
      System.out.println(total - L);
    } else if (L < 0) {
      if (L + N > 0) {
        System.out.println(total);
      } else {
        System.out.println(total - (L + N - 1));
      }
    }
  }
}