object Main extends App {
  override def main(args: Array[String]): Unit = {
    val lines = io.Source.stdin.getLines().toStream
    println(solve(lines))
  }

  def solve(lines: Seq[String]): Int = {
    val Array(a, p) = lines.head.split(" ").map(_.toInt)
    (a*3+p)/2
  }

  private def debug(x: Any): Unit = {
    if (System.getenv("LOCAL_DEBUG") != null) println(x)
  }
}