A fence 1m high stands 8m from a tall vertical wall on level ground, as in the figure. A ladder has its foot on the ground on the open side of the fence, leans against the wall, and touches the top of the fence on the way. What is the length of the shortest ladder that can do this?