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