function Main(input) {
    input = input.trim().split(" ");
    var A = parseInt(input[0],10);
    var P = parseInt(input[1],10);

    var output = Math.floor((3*A+P)/2);
    console.log(output);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));