/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
int num = 8756404;
int[] times = new int[10];
while(true){
if(num==0){
break;
}
int val = num%10;
times[val]++;
num /= 10;
}
for(int i=9; i>=0; i--){
for(int j=0; j<times[i]; j++){
}
}
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgovKiBOYW1lIG9mIHRoZSBjbGFzcyBoYXMgdG8gYmUgIk1haW4iIG9ubHkgaWYgdGhlIGNsYXNzIGlzIHB1YmxpYy4gKi8KY2xhc3MgSWRlb25lCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCWludCBudW0gPSA4NzU2NDA0OwoJCWludFtdIHRpbWVzID0gbmV3IGludFsxMF07CgkJd2hpbGUodHJ1ZSl7CgkJCWlmKG51bT09MCl7CgkJCQlicmVhazsKCQkJfQoJCQlpbnQgdmFsID0gbnVtJTEwOwoJCQl0aW1lc1t2YWxdKys7CgkJCW51bSAvPSAxMDsKCQl9CgkJZm9yKGludCBpPTk7IGk+PTA7IGktLSl7CgkJCWZvcihpbnQgaj0wOyBqPHRpbWVzW2ldOyBqKyspewoJCQkJU3lzdGVtLm91dC5wcmludChpKTsKCQkJfQoJCX0KCQlTeXN0ZW0ub3V0LnByaW50bG4oKTsKCX0KfQ==