Corruption and socially optimal entry