Start with a diagram of a cube just passing under a ribbon.
And maybe put the cube exactly in the middle, just to start with.
Next choose a size for the cube, any size, and calculate how long the ribbon would be if that was the biggest cube that would fit.
Was it 104 cm ? Adjust the cube size and try again ?