# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, P = lr()
P += A * 3
answer = P // 2
print(answer) import sys sys sr = lambda: sys.stdin.readline().rstrip() sr lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip ir = lambda: int(sr()) ir lambda: int(sr()) int(sr()) int sr() sr lr = lambda: list(map(int, sr().split())) lr lambda: list(map(int, sr().split())) list(map(int, sr().split())) list map(int, sr().split()) map int sr().split() ().split () sr split A, P = lr() A lr() lr P P += A * 3 P A * 3 A 3 answer = P // 2 answer P // 2 P 2 print(answer) print answer sr = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() sr answer = P // 2 P // 2 answer ir = lambda: int(sr()) lambda: int(sr()) ir P += A * 3 A * 3 P P = lr() lr() P lr = lambda: list(map(int, sr().split())) lambda: list(map(int, sr().split())) lr A, P = lr() lr() A
# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, P = lr()
P += A * 3
answer = P // 2
print(answer)
