Let $ABCD$ be a convex quadrilateral, and let $M$ and $N$ be the midpoints of $\overline{AC}$ and $\overline{BD},$ respectively.  Then there exists a constant $k$ so that
\[AB^2 + BC^2 + CD^2 + DA^2 = AC^2 + BD^2 + k \cdot MN^2.\]Find $k.$

[asy]
unitsize(0.8 cm);

pair A, B, C, D, M, N;

A = (0,0);
B = (4,0.5);
C = (5,-3);
D = (-2,-2.5);
M = (A + C)/2;
N = (B + D)/2;

draw(A--B--C--D--cycle);
draw(A--C);
draw(B--D);
draw(M--N);

label("$A$", A, NW);
label("$B$", B, NE);
label("$C$", C, SE);
label("$D$", D, SW);
dot("$M$", M, NE);
dot("$N$", N, NW);
[/asy]
Let $\mathbf{a} = \overrightarrow{A},$ etc.  Then
\begin{align*}
AB^2 &= \|\mathbf{a} - \mathbf{b}\|^2 \\
&= (\mathbf{a} - \mathbf{b}) \cdot (\mathbf{a} - \mathbf{b}) \\
&= \mathbf{a} \cdot \mathbf{a} - 2 \mathbf{a} \cdot \mathbf{b} + \mathbf{b} \cdot \mathbf{b}.
\end{align*}Similarly,
\begin{align*}
BC^2 &= \mathbf{b} \cdot \mathbf{b} - 2 \mathbf{b} \cdot \mathbf{c} + \mathbf{c} \cdot \mathbf{c}, \\
CD^2 &= \mathbf{c} \cdot \mathbf{c} - 2 \mathbf{c} \cdot \mathbf{d} + \mathbf{d} \cdot \mathbf{d}, \\
DA^2 &= \mathbf{d} \cdot \mathbf{d} - 2 \mathbf{d} \cdot \mathbf{a} + \mathbf{a} \cdot \mathbf{a}, \\
AC^2 &= \mathbf{a} \cdot \mathbf{a} - 2 \mathbf{a} \cdot \mathbf{c} + \mathbf{c} \cdot \mathbf{c}, \\
BD^2 &= \mathbf{b} \cdot \mathbf{b} - 2 \mathbf{b} \cdot \mathbf{d} + \mathbf{d} \cdot \mathbf{d},
\end{align*}so
\begin{align*}
&AB^2 + BC^2 + CD^2 + DA^2 - AC^2 - BD^2 \\
&= \mathbf{a} \cdot \mathbf{a} + \mathbf{b} \cdot \mathbf{b} + \mathbf{c} \cdot \mathbf{c} + \mathbf{d} \cdot \mathbf{d} \\
&\quad - 2 \mathbf{a} \cdot \mathbf{b} + 2 \mathbf{a} \cdot \mathbf{c} - 2 \mathbf{a} \cdot \mathbf{d} - 2 \mathbf{b} \cdot \mathbf{c} + 2 \mathbf{b} \cdot \mathbf{d} - 2 \mathbf{c} \cdot \mathbf{d}.
\end{align*}Finally,
\begin{align*}
MN^2 &= \left\| \frac{\mathbf{a} + \mathbf{c}}{2} - \frac{\mathbf{b} + \mathbf{d}}{2} \right\|^2 \\
&= \frac{1}{4} \|\mathbf{a} + \mathbf{c} - \mathbf{b} - \mathbf{d}\|^2 \\
&= \frac{1}{4} (\mathbf{a} + \mathbf{c} - \mathbf{b} - \mathbf{d}) \cdot (\mathbf{a} + \mathbf{c} - \mathbf{b} - \mathbf{d}) \\
&= \frac{1}{4} (\mathbf{a} \cdot \mathbf{a} + \mathbf{b} \cdot \mathbf{b} + \mathbf{c} \cdot \mathbf{c} + \mathbf{d} \cdot \mathbf{d} \\
&\quad - 2 \mathbf{a} \cdot \mathbf{b} + 2 \mathbf{a} \cdot \mathbf{c} - 2 \mathbf{a} \cdot \mathbf{d} - 2 \mathbf{b} \cdot \mathbf{c} + 2 \mathbf{b} \cdot \mathbf{d} - 2 \mathbf{c} \cdot \mathbf{d}).
\end{align*}Therefore, $k = \boxed{4}.$