'use strict'

function main(s) {

  s = s.split('\n')[0].split(' ');
  const a = Number(s[0]);
  const b = Number(s[1]);

  const ans = Math.ceil((a + b) / 2);
  console.log(ans);
}

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