303 - Strange Digits

Strange Digits

Time Limit: 1 sec


The Problem

There is a strange kind of problem you have to solve. Suppose you have a two digit number M. At first you have to find out the reverse value of M (Exp if M=40 the reverse of M is=04).Then you have to find out the maximum between M and its reverse. And subtract minimum from the maximum. And now add the digits of the result value. (Exp if subtracted result value is 26 the summation of its digits will be 2+6=8). That's it.



The Input

The input will be a two digit number (Not a palindrome) (0<M<100) in each line.


The Output

For each line of input print the summation of digits in a separate line by doing above stated operations.


Sample Input



Sample Output



[Note: A palindrome is a number from which we get the same number if we reverse it. Suppose 88 if we reverse it we get 88 again that means same. This kinds of numbers are palindrome.]





Problem Setter: Parag Paul