import scala.io.{StdIn => in}

object Main extends App {
  val Array(n, l) = in.readLine.split(" ").map(_.toInt)
  val total = (1 to n).map(i => l+i-1).sum

  val ans = (1 to n).map { i =>
      val v = (1 to n).filter(_ != i)./:(0)((acc, i) => acc + l+i-1)
      ((total - v).abs, v)
    }.minBy(_._1)._2

  println(ans)
}