from sys import stdin
def LI(): return list(map(int,stdin.readline().rstrip().split()))

tmp = LI()
a,p = [tmp.pop(0) for _ in range(2)]
ans = int((3*a+p)/2)
print(ans) from sys import stdin def LI(): return list(map(int,stdin.readline().rstrip().split())) LI tmp = LI() tmp LI() LI tmp.pop(0) for _ in range(2) for _ in range(2) _ range(2) range 2 for _ in range(2) tmp.pop(0) tmp.pop tmp pop 0 a,p = [tmp.pop(0) for _ in range(2)] a [tmp.pop(0) for _ in range(2)] p ans = int((3*a+p)/2) ans int((3*a+p)/2) int (3*a+p)/2 3*a+p 3*a 3 a p 2 print(ans) print ans tmp = LI() LI() tmp def LI(): return list(map(int,stdin.readline().rstrip().split())) def LI(): return list(map(int,stdin.readline().rstrip().split())) LI p = [tmp.pop(0) for _ in range(2)] [tmp.pop(0) for _ in range(2)] p ans = int((3*a+p)/2) int((3*a+p)/2) ans a,p = [tmp.pop(0) for _ in range(2)] [tmp.pop(0) for _ in range(2)] a
from sys import stdin
def LI(): return list(map(int,stdin.readline().rstrip().split()))

tmp = LI()
a,p = [tmp.pop(0) for _ in range(2)]
ans = int((3*a+p)/2)
print(ans)