a, p = [int(i) for i in input().split()]
p += 3 * a
print(p // 2) int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i a, p = [int(i) for i in input().split()] a [int(i) for i in input().split()] p p += 3 * a p 3 * a 3 a print(p // 2) print p // 2 p 2 p += 3 * a 3 * a p p = [int(i) for i in input().split()] [int(i) for i in input().split()] p a, p = [int(i) for i in input().split()] [int(i) for i in input().split()] a
a, p = [int(i) for i in input().split()]
p += 3 * a
print(p // 2)
