Deepanshu is very fond of good strings.
A string T is called a good string if it contains exactly 11 characters without any leading zeros and is a multiple of 5 in decimal notation, also the reverse(T) is a good string.
For example, 50000011155 is a good string whereas 51111111110 is not a good string.
You are given a string containing only numbers, in one operation you can delete any character from the string.
Deepanshu went some steps ahead for his fondness. So, he now wants you to apply the above operations any number of times (possibly zero) and find a good string with maximum digits sum.
For example, the digits sum of a good string 50000011155 is 18.
Note: In case there is no good string, print -1.
Input Format
Output Format
Print a single integer - the maximum digits sum of a good string (if it exists), else print -1.
Constraints