import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    a, p = input_nums()
    total = a * 3 + p
    print(total//2)

if __name__ == '__main__':
    main() import sys sys input = lambda: sys.stdin.readline().rstrip() input lambda: sys.stdin.readline().rstrip() sys.stdin.readline().rstrip() sys.stdin.readline().rstrip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline rstrip input_nums = lambda: list(map(int, input().split())) input_nums lambda: list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def main():
    a, p = input_nums()
    total = a * 3 + p
    print(total//2) main a, p = input_nums() a input_nums() input_nums p total = a * 3 + p total a * 3 + p a * 3 a 3 p print(total//2) print total//2 total 2 if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main input_nums = lambda: list(map(int, input().split())) lambda: list(map(int, input().split())) input_nums input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input def main():
    a, p = input_nums()
    total = a * 3 + p
    print(total//2) def main():
    a, p = input_nums()
    total = a * 3 + p
    print(total//2) main
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))

def main():
    a, p = input_nums()
    total = a * 3 + p
    print(total//2)

if __name__ == '__main__':
    main()
