Time Limit : sec, Memory Limit : KB
English / Japanese  

Sort Riddles

A sort riddle is a game in which you guess the original English word from a string of letters in an English word, rearranged in alphabetical order.

For example, if you are given the string aet, you can guess that the original English word was eat, ate, and so on.

To play this game, PCK, who is not good at English words, decided to think of the given string and all the strings that are rearranged.

Given a rearranged string, write a program to output the number of strings that PCK will consider.

Input

The input is given in the following format.

$str$

A string $str$ rearranged into a single line is given. $str$ contains only lowercase letters, and its length is between 1 and 8. Also, each character is arranged in alphabetical order from the beginning.

Output

Output the number of strings that PCK will think about.

Sample Input and Output

Sample Input 1

aet

Sample Output 1

6

Sample Input 2

eeei

Sample Output 2

4