Michael Scofield and Lincoln Burrows are working on a secret mission. Michael is needed to give a secret number to his brother Lincoln. Since the mission is secret and the secret number should not be known to others so Michael gave two strings to his brother instead of that number!
For finding the secret number, first, Lincoln will take the first string and add all the numeric digits from that string. By this, he will get a number . Lincoln will do the same process for the second string, and he will get another number . Then Lincoln will get three numbers , , by adding, multiplying and subtracting and respectfully. For Subtraction, he will take the absolute value. The secret number is the second smallest number in , , .
Since, Lincoln is weak at mathematics, he hired you for finding the secret number.
The first line of input contains a string .
The second line of input contains a string .
Both strings contain only one word.
Print the secret number inside a double quotation.
denotes the length of the string .
Login to submit