Production of ultracold neutrons by the method of rotating flat neutron mirrors