function Main(input) {
  const inputs = input.split(" ");
        a = parseInt(inputs[0], 10);
        b = parseInt(inputs[1], 10);

  console.log(Math.ceil((a+b)/2));

}

function debug(){
	var input = document.getElementById("input").value;
	Main(input);
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
