Two cubes are stacked on each other. The bottom cube has a length of 18 CM and the top cube is 13CM in length. Find the volume of the complex shape.