A, P = [int(x) for x in input().split()]
P += A * 3
print(P // 2) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x A, P = [int(x) for x in input().split()] A [int(x) for x in input().split()] P P += A * 3 P A * 3 A 3 print(P // 2) print P // 2 P 2 P = [int(x) for x in input().split()] [int(x) for x in input().split()] P A, P = [int(x) for x in input().split()] [int(x) for x in input().split()] A P += A * 3 A * 3 P
A, P = [int(x) for x in input().split()]
P += A * 3
print(P // 2)