This is a problem from NCPC 2005. Roy has an apartment with only one single electrical outlet, but he has a bunch of power strips. Compute the maximum number of outlets he can have using the power strips he has. The number of outlets per power strip is given as input.
It turns out that if the number of outlets of the strips respectively are
$$p_1, p_2, \dots, p_n$$
then the number of outlets is $$1 - n + \sum_i p_i$$ ,
or
$$1 + p_1-1 + p_2-1 + \dots + p_n-1$$.
The input to the program or function is a non-empty series of positive integers.
Examples
2 3 4
> 7
2 4 6
> 10
1 1 1 1 1 1 1 1
> 1
100 1000 10000
> 11098