I have troubles in showing this fact. Let $R$ be a ring, and assume that $e_1,\dots,e_n$ are central idempotents elements of $R$, i.e. idempotents contained in the center of $R$. Assume moreover that the following holds: $\sum_{i=1}^n e_i=1.$
Then prove that $R=e_1R\times e_2R\times\cdots\times e_nR,$
that is, the internal direct sum as an abelian group, in which the multiplication is defined componentwise.
Thanks in advance.
EDIT in the comments below the crucial points has been touched. Is it inessential that we assume $e_ie_j=0\quad \forall i\neq j$ or may this stronger hypothesis be recovered from the ones we are given in the text? (P.S. the problem lies in an handout my teacher gave to me and i've copied word by word)