A,P = (int(x) for x in input().split())

print((3 * A + P) // 2) int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int(x) int x A,P = (int(x) for x in input().split()) A (int(x) for x in input().split()) P print((3 * A + P) // 2) print (3 * A + P) // 2 3 * A + P 3 * A 3 A P 2 P = (int(x) for x in input().split()) (int(x) for x in input().split()) P A,P = (int(x) for x in input().split()) (int(x) for x in input().split()) A
A,P = (int(x) for x in input().split())

print((3 * A + P) // 2)