import Data.List main=print.(\x->x-1).length.group.sort.permutations=<