Smallest Calculated Value

아직 제출이 없습니다시간 제한1초메모리 제한1024 MB

문제

Given three integers and the arithmetic operators (++, -, \*\*, //), determine the smallest non-negative integer possible without changing the order of the initial integers. Order of the operators is without their normal precedence, just left-to-right. Note: integer division is fine only if the remainder is zero. For example, 9/39/3 is okay, 10/310/3 is not.

For example:

For 22, 33 and 55, the answer is 00 (2+352+3-5)

For 99, 99 and 99, the answer is 00 (99 / 99-9\ /\ 9)

For 55, 77 and 33, the answer is 11 (57+35-7+3)

Given three integers, determine the smallest non-negative result that can be computed by placement of the given operators between the numbers. The operators may only be placed between numbers, not in front (they are not unary operators). An operator must be placed between each pair of numbers, numbers cannot be concatenated.

입력

The single line of input contains three integers, all in the range from 11 to 1,0001{,}000.

출력

Output a single integer, which is the smallest non-negative value possible applying the arithmetic operators.