i = list(map(int, input().split())) 
Apple = 3 * i[0] + i[1]
print(Apple//2) i = list(map(int, input().split())) i list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split Apple = 3 * i[0] + i[1] Apple 3 * i[0] + i[1] 3 * i[0] 3 i[0] i 0 i[1] i 1 print(Apple//2) print Apple//2 Apple 2 i = list(map(int, input().split())) list(map(int, input().split())) i Apple = 3 * i[0] + i[1] 3 * i[0] + i[1] Apple
i = list(map(int, input().split())) 
Apple = 3 * i[0] + i[1]
print(Apple//2)