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

  if ((a + b) % 2 === 0) {
    console.log((a + b) / 2);
  } else {
    console.log(Math.ceil((a + b) / 2));
  }
}

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