n = int(input()) s1 = ((n % 100) // 10) + (n % 10) s2 = (n // 100) + ((n % 100) // 10) print(max(s1, s2), min(s1, s2), sep="")