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

p = (A * 3) + P

pie, m = divmod(p, 2)

print(pie) A, P = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split P p = (A * 3) + P p (A * 3) + P A * 3 A 3 P pie, m = divmod(p, 2) pie divmod(p, 2) divmod p 2 m print(pie) print pie pie, m = divmod(p, 2) divmod(p, 2) pie p = (A * 3) + P (A * 3) + P p m = divmod(p, 2) divmod(p, 2) m P = map(int, input().split()) map(int, input().split()) P A, P = map(int, input().split()) map(int, input().split()) A
A, P = map(int, input().split())

p = (A * 3) + P

pie, m = divmod(p, 2)

print(pie)
