k,n=map(int,input().split())
n+=(k*3)
print(n//2) k,n=map(int,input().split()) k map(int,input().split()) map int input().split() ().split () input split n n+=(k*3) n k*3 k 3 print(n//2) print n//2 n 2 n=map(int,input().split()) map(int,input().split()) n k,n=map(int,input().split()) map(int,input().split()) k n+=(k*3) k*3 n
k,n=map(int,input().split())
n+=(k*3)
print(n//2)