a, p = list(map(int, input().split()))
# a = list(map(int, input().split()))
#data = [list(map(int, input().split())) for i in range(n)]
# n = int(input())
# n, m = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
total = a*3+p
ans = total/2
print(int(ans)) a, p = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split p total = a*3+p total a*3+p a*3 a 3 p ans = total/2 ans total/2 total 2 print(int(ans)) print int(ans) int ans ans = total/2 total/2 ans p = list(map(int, input().split())) list(map(int, input().split())) p total = a*3+p a*3+p total a, p = list(map(int, input().split())) list(map(int, input().split())) a
a, p = list(map(int, input().split()))
# a = list(map(int, input().split()))
#data = [list(map(int, input().split())) for i in range(n)]
# n = int(input())
# n, m = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
total = a*3+p
ans = total/2
print(int(ans))
