CSES - Aalto Competitive Programming 2024 - wk8 - Mon - Piva and Glasses
  • Time limit: 1.00 s
  • Memory limit: 512 MB

Piva has recently lost her glasses, and she can not read words perfectly. She can recognize the letters in a word, but she can not notice their exact position. In other words, Piva will see a possible permutation of letters. Now you should count the number of possible words that she might see.

Input

A single line contains a single string of the word. Note that we guarantee that the word only contains letters a-z.

Output

Print a single integer that shows the number of possible words that Piva might see.

Constraints

The number of letters in a word is at most 1000.

Example 1

Input:

piva

Output:

24

Example 2

Input:

holo

Output:

12

Example 3

Input:

tobefairyouhavetohaveareallyhighiqtounderstandrickandmorty

Output:

2259695106709363415426373872839213074035118959571763200000000