What is the length of module $M/(M_1\cap M_2 \cap \cdots\cap M_n)$ given $M/M_i$ has finite length? I've met a problem in my algebra exercises.

Let $M_1,M_2,\ldots,M_n$ be submodules of $M$ such that each $M/M_i$ has finite length. Prove that $M/(M_1\cap M_2 \cap \cdots\cap M_n)$ has finite length. Moreover, determine a formula for computing this length.

I've tried some examples for this. 
Let
$$
M=\mathbb{Z},M_1=4\mathbb{Z},M_2=9\mathbb{Z},M_3=6\mathbb{Z}
$$
Denote $c(M)$ be the length of module $M$.
We have,
$$
c(M/M_1)=c(M/M_2)=c(M/M_3)=2
$$
$$
c(M/(M_1\cap M_2))=4,c(M/(M_1\cap M_3))=3
$$
It seems that it should be the $\sum_{i=1}^nc(M/M_i)$ minus something showing the relations between $M_i$. But I cant figure it out.
Can you please help? Thank you!
EDIT:
A summary of the answer:
Thanks to Georges Elencwajg's help, the formula should be:
$$
\begin{align*}
\phantom{=}&c(M/(M_1\cap M_2 \cap \cdots\cap M_n))\\
&=c(M/M_1)+\cdots+c(M/M_n)\\
&\quad{}-(c(M/(M_1+M_2))+c(M/(M_1+M_3))+\cdots+c(M/(M_{n-1}+M_n)))\\
&\quad{}+(c(M/(M_1+M_2+M_3))+\cdots+c(M/(M_{n-2}+M_{n-1}+M_n)))\\
&\qquad{}\vdots\\
&\quad{}+(-1)^{n-1}c(M/(M_1+\cdots+M_n))


\end{align*}
$$
 A: First, a reminder 

Key result on finite-length modules
  Given a short exact sequence of  modules $0\to N'\to N\to N''\to 0$, one has  the equivalence 
  $$N \text{ has finite length } \iff       N'\text{ and } N'' \text{ have finite length }  $$ 
  and if this is the case 
  $$\text{ length } (N)=    \text{ length } (N')+\text{ length } (N'')        $$

And now, back to your question. Consider the exact sequence
$  0\to M_1/M_1\cap M_2 \to  M/M_2  $
The implication  $\Rightarrow$ tells you that  $M_1/M_1\cap M_2$ has finite length,  since  by assumption$M/M_2$ has finite length.
Now contemplate the exact sequence
$0\to M_1/M_1\cap M_2 \to  M/M_1\cap M_2  \to M/M_1 \to 0$.
Since we just proved that the leftmost  module has finite length and since the rightmost module  has finite length by assumption , the implication  $\Leftarrow$ of the key result tells us that the middle module   $M/M_1 \cap M_2$ has finite length:  we have just proved the case $n=2$ of the question.
A trivial induction yields the general case.
