#abc103a. [abc103_a]Task Scheduling Problem
[abc103_a]Task Scheduling Problem
Problem Statement
You have three tasks, all of which need to be completed.
First, you can complete any one task at cost .
Then, just after completing the -th task, you can complete the -th task at cost .
Here, denotes the absolute value of .
Find the minimum total cost required to complete all the task.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the minimum total cost required to complete all the task.
Sample Input 1
1 6 3
Sample Output 1
5
When the tasks are completed in the following order, the total cost will be , which is the minimum:
- Complete the first task at cost .
- Complete the third task at cost .
- Complete the second task at cost .
Sample Input 2
11 5 5
Sample Output 2
6
Sample Input 3
100 100 100
Sample Output 3
0