function main(input) {
	var numbers = input.split(" ");
  	var A = parseInt(numbers[0]);
  	var P = parseInt(numbers[1]);
  	var allPiece = 3*A + P;
  	var applePie = Math.floor(allPiece/2);
  
  console.log(applePie);
  return applePie;
}

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