Four cubes with edge lengths $2,3,5,10$ are stacked in increasing order from top to bottom, with their back-left vertical edges aligned. Point $X$ is the top-back-left corner of the smallest cube, and point $Y$ is the bottom-front-right corner of the largest cube. What is the length of the portion of $\overline{XY}$ inside the cube with edge length $5$?