a, p = list(map(int,input().split()))



a_cracked = (a * 3) + p

print((a_cracked//2))
def main():

    A, P = (int(i) for i in input().split())

    print(((A*3+P)//2))





if __name__ == '__main__':

    main()

a, p = list(map(int, input().split()))
a_cracked = (a * 3) + p
print((a_cracked // 2))

def main():
    A, P = (int(i) for i in input().split())
    print(((A * 3 + P) // 2))


if __name__ == "__main__":
    main()

-a, p = list(map(int, input().split())) -a_cracked = (a * 3) + p -print((a_cracked // 2)) +def main(): +    A, P = (int(i) for i in input().split()) +    print(((A * 3 + P) // 2)) + + +if __name__ == "__main__": +    main()