3. The area of $\triangle A B C$ is $S, \angle A=45^{\circ}$, line $M N$ divides the area of $\triangle A B C$ into two equal parts, and $M$ is on $A B$, $N$ is on $A C$. Then the shortest length of $M N$ is $\qquad$
3. $\sqrt{2(\sqrt{2}-1) S}$

Let $A M=x, A N=y$, then $x y=\sqrt{2} S$,
$$
\begin{aligned}
M N^{2} & =x^{2}+y^{2}-2 x y \cos 45^{\circ} \\
& =x^{2}+\frac{(\sqrt{2} S)^{2}}{x^{2}}-2 \cdot \sqrt{2} S \cdot \frac{\sqrt{2}}{2} \\
& \geqslant 2 \sqrt{2} S-2 S=2 S(\sqrt{2}-1) .
\end{aligned}
$$

Thus, $M N \geqslant \sqrt{2(\sqrt{2}-1) S}$.