Economic design of a two-stage screening procedure with a prescribed outgoing quality