A, P = map(int, input().split())
hahen = A *3 + P
APpai = hahen //2
print(APpai) A, P = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split P hahen = A *3 + P hahen A *3 + P A *3 A 3 P APpai = hahen //2 APpai hahen //2 hahen 2 print(APpai) print APpai A, P = map(int, input().split()) map(int, input().split()) A P = map(int, input().split()) map(int, input().split()) P APpai = hahen //2 hahen //2 APpai hahen = A *3 + P A *3 + P hahen
A, P = map(int, input().split())
hahen = A *3 + P
APpai = hahen //2
print(APpai)