My explanation was very math-y, but it becomes easier to grasp if you think in dice. Roll X number of dice, and each die has Y sides.