function main(input){
  const args = input.split(' ');
  const a = parseInt(args[0], 10);
  const p = parseInt(args[1], 10);  
  const apple_piece=a*3+p;
  const pie=apple_piece/2;
  console.log(pie); 
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));