A, P = map(int, input().split())
ans = int(3*A/2 + P/2)
print(ans) A, P = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split P ans = int(3*A/2 + P/2) ans int(3*A/2 + P/2) int 3*A/2 + P/2 3*A/2 3*A 3 A 2 P/2 P 2 print(ans) print ans P = map(int, input().split()) map(int, input().split()) P ans = int(3*A/2 + P/2) int(3*A/2 + P/2) ans A, P = map(int, input().split()) map(int, input().split()) A
A, P = map(int, input().split())
ans = int(3*A/2 + P/2)
print(ans)