
function Main(input) {
    var A = parseInt(input[0], 10);
    var B = parseInt(input[1], 10);

    var sum = A + B;

    console.log(Math.ceil(sum/2));
}
 
Main(require("fs").readFileSync("/dev/stdin", "utf8").trim().split(/\n|\s/));