stdin = input().split(" ")
A = int(stdin[0])
P = int(stdin[1])

P += A * 3

print(P//2) stdin = input().split(" ") stdin input().split(" ") ().split () input split " " A = int(stdin[0]) A int(stdin[0]) int stdin[0] stdin 0 P = int(stdin[1]) P int(stdin[1]) int stdin[1] stdin 1 P += A * 3 P A * 3 A 3 print(P//2) print P//2 P 2 P = int(stdin[1]) int(stdin[1]) P stdin = input().split(" ") input().split(" ") stdin P += A * 3 A * 3 P A = int(stdin[0]) int(stdin[0]) A
stdin = input().split(" ")
A = int(stdin[0])
P = int(stdin[1])

P += A * 3

print(P//2)