How to calculate the capacity of a series battery pack