A square pyramid and a cube are given whose bases have same dimensions. What will be the total number of vertices the figure will have if the cube is attached to square pyramid along its base?