function countPie(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);
  

  return applePie;
}