function main(input){
	var num = input.split(" "); 
  	var a = parseInt(num[0]);
  	var b = parseInt(num[1]);
	var allPiece = 3*a + b;
  	var allPi = Math.floor(allPiece/2);
    
    console.log(allPi);
}


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