const main = (input) => {
  var inputs = input.trim();
  var a = inputs.split(" ")[0]-0;
  var b = inputs.split(" ")[1]-0;
  var ans = ~~((a*3+b)/2);
  console.log(ans);
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8'));
