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