let main = (input) => {
  let inputList = input.split(' ')
  let a = Number.parseInt(inputList[0])
  let p = Number.parseInt(inputList[1])
  let result = ((a*3) + p) / 2
  console.log(Math.floor(result))
}

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