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