Victor, as a mathematician, reasons best in
Victor's gym teacher, Roger, has set up an obstacle course of sorts for Victor. The obstacle course is modeled after
the number line, with checkpoints at one of
Compute the maximum number of points Victor can earn, given the configuration Roger has set up for him.
Constraints
All
Input Specification
The first line will contain two space-separated integers,
Each of the next
Output Specification
Print, on a single line, the maximum score Victor can obtain if he runs optimally.
Sample Input
3 15
6
-3
1
Sample Output
25
Comments