# 128 A

a, p = map(int, input().split())
app = a * 3 + p
num = int(app / 2)
print(num) a, p = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split p app = a * 3 + p app a * 3 + p a * 3 a 3 p num = int(app / 2) num int(app / 2) int app / 2 app 2 print(num) print num a, p = map(int, input().split()) map(int, input().split()) a num = int(app / 2) int(app / 2) num p = map(int, input().split()) map(int, input().split()) p app = a * 3 + p a * 3 + p app
# 128 A

a, p = map(int, input().split())
app = a * 3 + p
num = int(app / 2)
print(num)