function Main(input) {
  input = input.split(' ').map(Number);
  const a = input[0], b = input[1];
  console.log(Math.ceil((a+b)/2))
}

// Don't edit this line!
Main(require("fs").readFileSync("/dev/stdin", "utf8"));