digits = [int(c) for c in str(int(input()))] ans = 0 i = 0 for digit in sorted(digits): ans = ans + (digit * 10 ** i) i += 1 print(ans)