	function Main(input) {
		const nums = input.split(" ");
		const A = parseInt(nums[0], 10);
		const P = parseInt(nums[1], 10);
		const pies = Math.floor((A * 3 + P) / 2);
		console.log(pies);

  	}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));