5. Square $A B C D$ and square $A B E F$ are in planes that form a $120^{\circ}$ angle, $M$ and $N$ are points on the diagonals $A C$ and $B F$ respectively, and $A M=F N$. If $A B=1$, then the maximum value of $M N$ is $\qquad$