Combination of cells in series and in parallel