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

piece = A * 3
pie = (piece+P) // 2
print(pie)

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

piece = A * 3
pie = (piece+P) // 2
print(pie)


