eolymp
bolt
Try our new interface for solving problems
Problems

Anagrams

Anagrams

Time limit 1 second
Memory limit 128 MiB

Anagram is any permutation of all the letters in the word. For example, from the word SOLO we can generate 12 anagrams: SOLO, LOSO, OSLO, OLSO, OSOL, OLOS, SLOO, LSOO, OOLS, OOSL, LOOS, SOOL.

Write a program that prints a number of different anagrams that can be generated from the given word.

Input data

The word of length no more than 14 letters.

Output data

Print the number of different anagrams.

Examples

Input example #1
SOLO
Output example #1
12