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