Dragon
Easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Every centipede has legs and head. Find the quantity of legs of a -head dragon, if there is total of heads and legs.
Input
4 numbers: , , , . Every numbers is less or equals to 1000. It is guaranteed that there is at least one dragon and one centipede.
Output
The number of legs of a dragon. If input data is contradiction, then output , if there is more than one answer, output any one of them.
Examples
Input #1
Answer #1
Submissions 16K
Acceptance rate 16%