The Optimal Distribution of Population Across Cities