Find the length of the longest rod that can be placed in a room

Find the length of the longest rod that can be placed in a room