S = input() D = {str(i) : 0 for i in range(10)} for s in S : D[s] += 1 ans = "" for i in range(9,-1,-1) : k = str(i) ans += k * D[k] print(ans)