import java.util.*; public class Exercise62{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); String str = sc.next(); String[] array = str.split(""); int[] nums = new int[array.length]; for (int i = 0; i < array.length; i++){ nums[i] = Integer.parseInt(array[i]); } Arrays.sort(nums); int sum = 0; int digit = 1; for (int i = 0; i < nums.length; i++){ sum += nums[i] * digit; digit *= 10; } System.out.println(sum); } }