A, P = [int(i) for i in input().strip().split()]

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

pieces = 3*A + P
print(pieces // 2)
