function main(input) {
  let inputList = input.split(" ")
  let a = parseInt(inputList[0], 10)
  let p = parseInt(inputList[1], 10)

  console.log(Math.floor((a * 3 + p) / 2))
}

main(require('fs').readFileSync('/dev/stdin', 'UTF-8'))
