import numpy as np

A,P = list(map(int, input().split()))

print((int(np.floor((3*A+P)/2))))
import math

A,P = list(map(int, input().split()))

print((int(math.floor((3*A+P)/2))))
import numpy as np

A, P = list(map(int, input().split()))
print((int(np.floor((3 * A + P) / 2))))

import math

A, P = list(map(int, input().split()))
print((int(math.floor((3 * A + P) / 2))))

-import numpy as np +import math -print((int(np.floor((3 * A + P) / 2)))) +print((int(math.floor((3 * A + P) / 2))))