def main():
    import math
    a, p = map(int, input().split())
    print(math.floor((3*a + p)/ 2))





if __name__ == "__main__":
    main() def main():
    import math
    a, p = map(int, input().split())
    print(math.floor((3*a + p)/ 2)) main import math math a, p = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split p print(math.floor((3*a + p)/ 2)) print math.floor((3*a + p)/ 2) math.floor math floor (3*a + p)/ 2 3*a + p 3*a 3 a p 2 if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    import math
    a, p = map(int, input().split())
    print(math.floor((3*a + p)/ 2)) def main():
    import math
    a, p = map(int, input().split())
    print(math.floor((3*a + p)/ 2)) main
def main():
    import math
    a, p = map(int, input().split())
    print(math.floor((3*a + p)/ 2))





if __name__ == "__main__":
    main()