Two cubes, each of volume 512 cm3 are joined end to end, find the surface area of the resulting cuboid.