A rectangular cuboid has edges of lengths x, y and z. It is divided into x*y*z cubes each having dimension 1x1x1 by planes parallel to its faces.
A diagonal joins a vertex of the cuboid to the vertex furthest away from it.
Determine the total number of cubes that this diagonal intersects.