"use strict"
function main(arg) {
    arg = arg.trim().split("\n")[0].split(" ").map(Number)
    var A = arg[0]
    var P = arg[1]
    var k = A * 3 + P
    console.log(Math.floor(k / 2))
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));