#include using namespace std; using ll = long long; using vll = vector; using vvll = vector; using vvvll = vector; #define all(A) A.begin(),A.end() #define rep(i, n) for (ll i = 0; i < (ll) (n); i++) vvll G; int main() { ll A; cin>>A; vll D(3); rep(i,3){ D[i]=A%10; A/=10; } sort(all(D)); cout<