N = list(map(int, input())) N.sort() N.reverse() N = list(map(str, N)) print(int(''.join(N)))