import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, P = list(map(int, sys.stdin.readline().split()))
    print((A*3 + P)//2)


if __name__ == '__main__':
    main() import sys sys import os os def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, P = list(map(int, sys.stdin.readline().split()))
    print((A*3 + P)//2) main if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

     os.getenv("LOCAL") os.getenv os getenv "LOCAL" sys.stdin = open("input.txt", "r") sys.stdin sys stdin open("input.txt", "r") open "input.txt" "r" A, P = list(map(int, sys.stdin.readline().split())) A list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split P print((A*3 + P)//2) print (A*3 + P)//2 A*3 + P A*3 A 3 P 2 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, P = list(map(int, sys.stdin.readline().split()))
    print((A*3 + P)//2) def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, P = list(map(int, sys.stdin.readline().split()))
    print((A*3 + P)//2) main
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, P = list(map(int, sys.stdin.readline().split()))
    print((A*3 + P)//2)


if __name__ == '__main__':
    main()
