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