object Main extends App {
  import scala.annotation.tailrec

  @tailrec
  def loop() {
    val line = scala.io.StdIn.readLine()
    if (line == null) return
    else {
      val n = line.split(' ').map(_.toInt).sum
      println(n)
      loop()
    }
  }

  loop()
}