N = input() a = [0] * 10 for i in N: a[int(i)] += 1 S = "" for i in reversed(range(10)): S += int(i)*a[i] print(int(S))