Creating random number from 1 numeric question in roster

Hi colleagues,
I have a little problem with random number. Everything works well, but sometimes we get 0 for a random number. I use next sintax to compute random number:

  1. We have one number field on the roster for each household member in order to calculate the sum of a number field for each household member I used the following syntax
    variable1
    rostername.Sum(x=>x.numericnumberquestion)
    Next, the resulting variable is used as a range to obtain a random number
  2. Syntax for random number
    (int)Math.Floor(Quest.IRnd()*variable1.Value)
    so how can we set range for random number from 1 not from 0.

See https://galileo.phys.virginia.edu/compfac/courses/practical-c/02.pdf