def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, p = Input()
    x = a*3 + p
    ans = x//2
    print(ans)

main() def mapt(fn, *args):
    return tuple(map(fn, *args)) mapt return tuple(map(fn, *args)) tuple(map(fn, *args)) tuple map(fn, *args) map fn *args args fn fn *args def Input():
    return mapt(int, input().split(" ")) Input return mapt(int, input().split(" ")) mapt(int, input().split(" ")) mapt int input().split(" ") ().split () input split " " def main():
    a, p = Input()
    x = a*3 + p
    ans = x//2
    print(ans) main a, p = Input() a Input() Input p x = a*3 + p x a*3 + p a*3 a 3 p ans = x//2 ans x//2 x 2 print(ans) print ans main() main def mapt(fn, *args):
    return tuple(map(fn, *args)) def mapt(fn, *args):
    return tuple(map(fn, *args)) mapt def main():
    a, p = Input()
    x = a*3 + p
    ans = x//2
    print(ans) def main():
    a, p = Input()
    x = a*3 + p
    ans = x//2
    print(ans) main def Input():
    return mapt(int, input().split(" ")) def Input():
    return mapt(int, input().split(" ")) Input
def mapt(fn, *args):
    return tuple(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    a, p = Input()
    x = a*3 + p
    ans = x//2
    print(ans)

main()