fun main(args: Array<String>) {


    val (a, p) = readLine()!!.split(' ').map(String::toLong)
    val max = ((a * 3) + p) / 2
    println(max)

}

fun readList() = readLine()!!.split(' ')
fun readLongList() = readList().map(String::toLong)

fun readLong() = readLine()!!.toLong()
fun readString() = readLine()!!

fun readPair(): Pair<String, String> {
    val splite = readLine()!!.split(' ')
    return Pair(splite[0], splite[1])
}

fun <T> List<T>.copy() = this.map { it }

// 速度のためforEachは避ける
fun Int.rep(start: Int = 0, body: (Int) -> Unit) {
    for (i in start until this) {
        body(i)
    }
}

fun Long.rep(start: Long = 0, body: (Long) -> Unit) {
    for (i in start until this) {
        body(i)
    }
}