import scala.io.StdIn._
object Main extends App{
  val sc = new java.util.Scanner(System.in)
  val a = sc.nextInt
  val b = sc.nextInt
  if((a+b)%2==0){
    println((a+b)/2)
  }
  else{
    println((a+b)/2+1)
  }  
}