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

apple = a*3
applepie = (apple+p) // 2

print(applepie) a,p = map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split p apple = a*3 apple a*3 a 3 applepie = (apple+p) // 2 applepie (apple+p) // 2 apple+p apple p 2 print(applepie) print applepie apple = a*3 a*3 apple p = map(int,input().split()) map(int,input().split()) p applepie = (apple+p) // 2 (apple+p) // 2 applepie a,p = map(int,input().split()) map(int,input().split()) a
#A
a,p = map(int,input().split())

apple = a*3
applepie = (apple+p) // 2

print(applepie)