#include <bits/stdc++.h>using namespace std;int n, a, b, c, maxx;int main(){ cin >> n; c = n % 10; b = (n / 10) % 10; a = n / 100;
if(a <= b && b <= c) maxx = c * 100 + b * 10 + a; if(a <= c && c <= b) maxx = b * 100 + c * 10 + a; if(b <= a && a <= c) maxx = c * 100 + a * 10 + b; if(b <= c && c <= a) maxx = a * 100 + c * 10 + b; if(c <= a && a <= b) maxx = b * 100 + a * 10 + c; if(c <= b && b <= a) maxx = a * 100 + b * 10 + c; cout << maxx;
return 0;}