On a stochastic model of an epidemic