This paper describes a method based on mixedinteger linear programming to cost-optimally locate and size chargers for electric vehicles (EVs) in distribution grids as a function of the driving demand. The problem accounts for the notion of single-port chargers (SPCs), where a charger can interface one EV maximum, and multi-port chargers (MPCs), where the same charger can interface multiple EVs. The advantage of MPCs is twofold. First, multiple ports allow arbitraging the charging among multiple vehicles without requiring the drivers to plug and unplug EVs. Second, the charger's power electronics is not sized for the total number of charging ports, enabling cost savings when the grid constraints are bottleneck of the problem. The proposed method can account for different charger typologies, such as slow and fast chargers, and model the drivers' flexibility of plugging and unplugging their EVs. Simulation results from a synthetic case study show that implementing MPCs is beneficial over both SPCs and drivers' flexibility in terms of total investments required for the charging infrastructure.