a, p = map(int,input().split())

pieces = p + a*3
apple_pie = pieces / 2
print (int(apple_pie)) a, p = map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split p pieces = p + a*3 pieces p + a*3 p a*3 a 3 apple_pie = pieces / 2 apple_pie pieces / 2 pieces 2 print (int(apple_pie)) print int(apple_pie) int apple_pie a, p = map(int,input().split()) map(int,input().split()) a apple_pie = pieces / 2 pieces / 2 apple_pie p = map(int,input().split()) map(int,input().split()) p pieces = p + a*3 p + a*3 pieces
a, p = map(int,input().split())

pieces = p + a*3
apple_pie = pieces / 2
print (int(apple_pie))