The economics of urban size