fun main(args: Array<String>) {
    val scanner = System.`in`.bufferedReader()
    val input = scanner.readLine().split(" ").map(Integer::parseInt)
    val apples = input[0]
    var pieces = input[1]
    pieces += apples * 3
    val pies = pieces / 2
    println(pies)
}