18.5. On the sides $C B$ and $C D$ of the square $A B C D$, points $M$ and $K$ are taken such that the perimeter of triangle $C M K$ is equal to twice the side of the square. Find the measure of angle $M A K$.
18.5. Rotate the given square around point $A$ by $90^{\circ}$ so that vertex $B$ moves to $D$. Let $M^{\prime}$ be the image of point $M$ under this rotation. Since by the condition $M K+M C+C K=(B M+M C)+(K D+C K)$, then $M K=B M+K D=D M^{\prime}+K D=K M^{\prime}$. Moreover, $A M=A M^{\prime}$, therefore $\triangle A M K=\triangle A M^{\prime} K$, which means $\angle M A K=\angle M^{\prime} A K=\angle M A M^{\prime} / 2=45^{\circ}$.