object Main extends App {
  val line = scala.io.StdIn.readLine()
  val num = line.toInt
  println(new candy(num).toInt)

  class candy(n: Int) {
    val num = n
    val result = 0
    def calc(num: Int, r: Int): Int =
      if (num == 0) r else calc(num - 1, r + num)
    def toInt = calc(num, result)
  }
}
