def q1():
    A,P = (int(i) for i in input().split())
    sum = A * 3 + P
    ans,_ = divmod(sum, 2)
    print(ans)


if __name__ == '__main__':
    q1() def q1():
    A,P = (int(i) for i in input().split())
    sum = A * 3 + P
    ans,_ = divmod(sum, 2)
    print(ans) q1 int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i A,P = (int(i) for i in input().split()) A (int(i) for i in input().split()) P sum = A * 3 + P sum A * 3 + P A * 3 A 3 P ans,_ = divmod(sum, 2) ans divmod(sum, 2) divmod sum 2 _ print(ans) print ans if __name__ == '__main__':
    q1() __name__ == '__main__' __name__ '__main__' q1() q1 def q1():
    A,P = (int(i) for i in input().split())
    sum = A * 3 + P
    ans,_ = divmod(sum, 2)
    print(ans) def q1():
    A,P = (int(i) for i in input().split())
    sum = A * 3 + P
    ans,_ = divmod(sum, 2)
    print(ans) q1
def q1():
    A,P = (int(i) for i in input().split())
    sum = A * 3 + P
    ans,_ = divmod(sum, 2)
    print(ans)


if __name__ == '__main__':
    q1()