It costs $24 to paint a cube. Before painting, it was cut in four pieces by two planes. What is maximum possible cost to paint these four pieces?