while read -n1 C;{$[++a[C]]};for i in {0..10};{for$[j=a[i];j;j--];{o+=$i}};echo $o