  We study a generalization of the Random Energy Model to the case when the
number of exponential factors varies at random. Also a relation between REM and
the Erd"os-R'enyi limit theorem for maximums of partial sums is considered.
