import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    a,p=map(int, input().split())
    print((a*3+p)//2)
resolve() import sys sys def input(): return sys.stdin.readline().strip() input def resolve():
    a,p=map(int, input().split())
    print((a*3+p)//2) resolve a,p=map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split p print((a*3+p)//2) print (a*3+p)//2 a*3+p a*3 a 3 p 2 resolve() resolve def resolve():
    a,p=map(int, input().split())
    print((a*3+p)//2) def resolve():
    a,p=map(int, input().split())
    print((a*3+p)//2) resolve def input(): return sys.stdin.readline().strip() def input(): return sys.stdin.readline().strip() input
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    a,p=map(int, input().split())
    print((a*3+p)//2)
resolve()