const Main = input => {
    input = input[0].split(' ');
    const a = parseInt(input[0], 10), p = parseInt(input[1], 10);
    console.log(Math.floor((a*3+p)/2));
}
Main(require("fs").readFileSync("/dev/stdin", "utf8").split('\n'));