Mr. Garg has a string S, which has the following properties,
As it is a tedious task for him to do this alone so he wants help, in knowing the maximum possible sum.
So, the task is to calculate the maximum possible sum of the three integers from the given string S.
Input
Output
Print the only number — the maximum possible sum of a, b and c. If Mr. Garg is wrong and the string can't be obtained according to the properties given then output number -1.
Constraints
The string must be split into numbers 1, 0, and 23 so the sum is 24.