def main():
    A, P = map(int, input().split())

    pieces = 3 * A + P
    ans = pieces // 2

    print(ans)


if __name__ == "__main__":
    main() def main():
    A, P = map(int, input().split())

    pieces = 3 * A + P
    ans = pieces // 2

    print(ans) main A, P = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split P pieces = 3 * A + P pieces 3 * A + P 3 * A 3 A P ans = pieces // 2 ans pieces // 2 pieces 2 print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    A, P = map(int, input().split())

    pieces = 3 * A + P
    ans = pieces // 2

    print(ans) def main():
    A, P = map(int, input().split())

    pieces = 3 * A + P
    ans = pieces // 2

    print(ans) main
def main():
    A, P = map(int, input().split())

    pieces = 3 * A + P
    ans = pieces // 2

    print(ans)


if __name__ == "__main__":
    main()
