Monte Carlo Model of the Experiment on Measuring the Neutron Lifetime