import scala.io.StdIn._

object Main extends App {
  val nums: Array[Int] = readLine().split(" ").map(_.toInt)
  val sum: Int = nums(0) + nums(1)
  if (sum % 2 == 0) {
    println(sum / 2)
  } else {
    println(sum / 2 + 1)
  }
}
