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