In right triangle $ABC,$ $\angle C = 90^\circ$. Median $\overline{AM}$ has a length of 1, and median $\overline{BN}$ has a length of 1. What is the length of the hypotenuse of the triangle?