'use strict'
function Main(input) {
    input = input.trim().split(/\n/)[0]
    input = input.split(' ').map(s => parseInt(s))
    const A = input[0]
    const P = input[1]

    const kakera = 3 * A + P
    
    const result = Math.floor(kakera / 2)


    console.log(result)
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"))