import sys
input = lambda: sys.stdin.readline().rstrip() 

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

if __name__ == '__main__':
    resolve() 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 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 if __name__ == '__main__':
    resolve() __name__ == '__main__' __name__ '__main__' resolve() resolve input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input 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
import sys
input = lambda: sys.stdin.readline().rstrip() 

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

if __name__ == '__main__':
    resolve()