import sys

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


a, p = nm()
p = p + a * 3
print(p // 2) import sys sys stdin = sys.stdin stdin sys.stdin sys stdin def ns(): return stdin.readline().rstrip() ns def ni(): return int(stdin.readline().rstrip()) ni def nm(): return map(int, stdin.readline().split()) nm def nl(): return list(map(int, stdin.readline().split())) nl a, p = nm() a nm() nm p p = p + a * 3 p p + a * 3 p a * 3 a 3 print(p // 2) print p // 2 p 2 def ns(): return stdin.readline().rstrip() def ns(): return stdin.readline().rstrip() ns stdin = sys.stdin sys.stdin stdin a, p = nm() nm() a p = p + a * 3 p + a * 3 p def nl(): return list(map(int, stdin.readline().split())) def nl(): return list(map(int, stdin.readline().split())) nl p = nm() nm() p def ni(): return int(stdin.readline().rstrip()) def ni(): return int(stdin.readline().rstrip()) ni def nm(): return map(int, stdin.readline().split()) def nm(): return map(int, stdin.readline().split()) nm
import sys

stdin = sys.stdin
def ns(): return stdin.readline().rstrip()
def ni(): return int(stdin.readline().rstrip())
def nm(): return map(int, stdin.readline().split())
def nl(): return list(map(int, stdin.readline().split()))


a, p = nm()
p = p + a * 3
print(p // 2)
