#K35037. Minimum Total Cooking Time

    ID: 25442 Type: Default 1000ms 256MiB

Minimum Total Cooking Time

Minimum Total Cooking Time

You are given n cooking tasks with their respective durations. In order to guarantee that each task cooks properly, you must add at least one unit of additional time to one of the tasks. The minimum total cooking time is achieved by simply adding a single unit of time to the overall sum of durations.

Mathematically, if the durations are \(t_1, t_2, \dots, t_n\), the answer is given by:

\[ \text{Answer} = \left(\sum_{i=1}^{n} t_i\right) + 1 \]

inputFormat

The input is read from standard input (stdin). The first line contains an integer n representing the number of cooking tasks. The second line contains n space-separated integers where each integer represents the duration of a cooking task.

outputFormat

Output the minimum total cooking time to the standard output (stdout) as a single integer.

## sample
3
2 3 4
10

</p>