How do I use cell multiple times in formula

Hi,
I’d like to ask how to use one cell multiple times in a formula. I’d like to use it for some calculations in statistics. For instance: table of number of children in a family in some village - 0 children - 30 families, 1 child - 50 families, 2 children - 45 families etc… So when calculating modus (and other) it is neccessary to enter 0 children 30 times, 1 child 50 times manually… Is there some syntactic contraction? Something like A1x30?

And how to avoid limitation max. 30 values in formula for median?