hole_apple, piece_apple = map(int, input().split())

total_piece_apple = hole_apple * 3 + piece_apple
print(total_piece_apple // 2) hole_apple, piece_apple = map(int, input().split()) hole_apple map(int, input().split()) map int input().split() ().split () input split piece_apple total_piece_apple = hole_apple * 3 + piece_apple total_piece_apple hole_apple * 3 + piece_apple hole_apple * 3 hole_apple 3 piece_apple print(total_piece_apple // 2) print total_piece_apple // 2 total_piece_apple 2 hole_apple, piece_apple = map(int, input().split()) map(int, input().split()) hole_apple total_piece_apple = hole_apple * 3 + piece_apple hole_apple * 3 + piece_apple total_piece_apple piece_apple = map(int, input().split()) map(int, input().split()) piece_apple
hole_apple, piece_apple = map(int, input().split())

total_piece_apple = hole_apple * 3 + piece_apple
print(total_piece_apple // 2)