# ABC128
# Apple Pie
a, p = map(int, input().split())
p = (a * 3) + p
print( p // 2) a, p = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split p p = (a * 3) + p p (a * 3) + p a * 3 a 3 p print( p // 2) print p // 2 p 2 a, p = map(int, input().split()) map(int, input().split()) a p = map(int, input().split()) map(int, input().split()) p p = (a * 3) + p (a * 3) + p p
# ABC128
# Apple Pie
a, p = map(int, input().split())
p = (a * 3) + p
print( p // 2)
