#include <iostream>
using namespace std;
int main()
{
	int n,ge,shi,bai,x;
	cin>>n;
	ge = n%10;
	shi = (n/10)%10;
	bai = n/100;
	if(ge>shi)swap(ge,shi);
	if(shi>bai)swap(shi,bai);
	if(ge>shi)swap(ge,shi);
	x = ge+shi*10+bai*100;
	cout << x;
 } 
/**************************************************************
	Problem: 1042
	User: xiaomingze
	Language: C++
	Result: Accepted
	Time:17 ms
	Memory:2072 kb
****************************************************************/