import scala.io.StdIn

object Main extends App {
  val Array(a, p)  =  StdIn.readLine().split(" ").map(_.toDouble)

  def solve(a: Double, p: Double): Int = {
    Math.floor((a * 3 + p) / 2).toInt
  }
  println(solve(a, p))

}
  

