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