Sum of unknown number of inputs