function main(input) {
  const args   = input.split(' ');
  const a      = parseInt(args[0], 10);
  const p      = parseInt(args[1], 10);
  const total  = a * 3 + p;
  const result = Math.floor(total / 2);
  console.log(result);
}

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