function main(input) {
  input = input.trim();
  const a = input.split(" ").map(Number);
  if((a[0]+a[1])%2==0){
  	console.log((a[0]+a[1])/2);
  }else{
    console.log(((a[0]+a[1])/2)+1);
  }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));