import sys

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


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


if __name__ == '__main__':
    solve() 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 solve():
    A, P = map(int, input().split())
    ans = (A * 3 + P) // 2
    print(ans) solve A, P = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split P ans = (A * 3 + P) // 2 ans (A * 3 + P) // 2 A * 3 + P A * 3 A 3 P 2 print(ans) print ans if __name__ == '__main__':
    solve() __name__ == '__main__' __name__ '__main__' solve() solve input = lambda: sys.stdin.readline().rstrip() lambda: sys.stdin.readline().rstrip() input def solve():
    A, P = map(int, input().split())
    ans = (A * 3 + P) // 2
    print(ans) def solve():
    A, P = map(int, input().split())
    ans = (A * 3 + P) // 2
    print(ans) solve
import sys

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


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


if __name__ == '__main__':
    solve()
