#include
void swap(int* a, int* b) {
int t = *a;
*a = *b;
*b = t;
}
int main(void) {
int a[3], n, i = 0;
scanf("%d", &n);
while (n) {
a[i++] = n % 10;
n /= 10;
}
if (a[1] < a[0]) swap(&a[1], &a[0]);
if (a[2] < a[0]) swap(&a[2], &a[0]);
if (a[2] < a[1]) swap(&a[2], &a[1]);
if (a[0] == 0 && a[1] != 0) swap(&a[1], &a[0]);
if (a[0] == 0 && a[1] == 0) swap(&a[2], &a[0]);
printf("%d%d%d", a[0], a[1], a[2]);
return 0;
}
#include
using namespace std;
int a[4];
int main(){
int n;
cin>>n;
a[3]=n%10;
a[2]=(n/10)%10;
a[1]=(n/100)%10;
sort(a+1,a+4);
cout< return 0;
}