N = int(input()) a = [0] * 10 while N != 0: a[N % 10] += 1 N = N // 10 keta = sum(a) """ now = 0 t = 1 for i in range(keta): while True: if a[now] != 0: N += now * t t *= 10 a[now] -= 1 break else: now += 1 print(N) """ S = '' for i in reversed(range(10)): S += str(i) * a[i] print(int(S))