4. In square $A B C D$, $M$ is the midpoint of side $B C$. If $\overrightarrow{A C}=\lambda \overrightarrow{A M}+\mu \overrightarrow{B D}$, then $\lambda+\mu=(\quad)$.
(A) $\frac{4}{3}$
(B) $\frac{5}{3}$
(C) $\frac{15}{8}$
(D) 2