A, P = map(int, input().split())

A = A * 3

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

A = A * 3

s = A + P
print(s//2)