a, p = map(int, input().split(' '))

cut = a * 3
total = cut + p

print(total // 2) a, p = map(int, input().split(' ')) a map(int, input().split(' ')) map int input().split(' ') ().split () input split ' ' p cut = a * 3 cut a * 3 a 3 total = cut + p total cut + p cut p print(total // 2) print total // 2 total 2 cut = a * 3 a * 3 cut a, p = map(int, input().split(' ')) map(int, input().split(' ')) a total = cut + p cut + p total p = map(int, input().split(' ')) map(int, input().split(' ')) p
a, p = map(int, input().split(' '))

cut = a * 3
total = cut + p

print(total // 2)