object Main extends App {
  val inputs: Seq[String] = scala.io.Source.stdin.getLines().toList
  val num = inputs.head.map(_.toInt)

  println(solve(num))

  def solve(num: Int): Int = {
    (0 to num).foldLeft(0){ (acc, i) => acc + i }
  }
}