How to produce an "elongated diagonal matrix"?

I know this question sounds a bit weird but it basically comes down to this. I want to create a matrix of this type:

$\displaystyle \begin{pmatrix}

1 & 0 & 0\\

1 & 0 & 0\\

1 & 0 & 0\\

0 & 1 & 0\\

0 & 1 & 0\\

0 & 1 & 0\\

0 & 0 & 1\\

0 & 0 & 1\\

0 & 0 & 1

\end{pmatrix}$

How do I produce such a matrix, using **only** matrix multiplication? I've tried a lot of things myself but my understanding of matrix algebra is too limited to "see" how it can be done. Ideally, I would like a general formula where I can specify the amount of columns and the amount of repetitions (1's) in each column. For instance, 2 repeats and 4 columns:

$\displaystyle \begin{pmatrix}

1 & 0 & 0 & 0\\

1 & 0 & 0 & 0\\

0 & 1 & 0 & 0\\

0 & 1 & 0 & 0\\

0 & 0 & 1 & 0\\

0 & 0 & 1 & 0\\

0 & 0 & 0 & 1\\

0 & 0 & 0 & 1

\end{pmatrix}$

Anyone has suggestions?