x,y = map(int, input().split())

sum_keppen = x*3 +y

print(sum_keppen//2) x,y = map(int, input().split()) x map(int, input().split()) map int input().split() ().split () input split y sum_keppen = x*3 +y sum_keppen x*3 +y x*3 x 3 y print(sum_keppen//2) print sum_keppen//2 sum_keppen 2 y = map(int, input().split()) map(int, input().split()) y sum_keppen = x*3 +y x*3 +y sum_keppen x,y = map(int, input().split()) map(int, input().split()) x
x,y = map(int, input().split())

sum_keppen = x*3 +y

print(sum_keppen//2)