static void Main(string[] args)
string tests = Console.ReadLine();
Console.WriteLine(CountAnagrams(tests));
private static BigInteger Factorial(int value)
for (int i = 2; i <= value; ++i)
private static BigInteger CountAnagrams(string value)
if (string.IsNullOrEmpty(value))
.Aggregate(Factorial(value.Length), (s, group) => s / Factorial(group.Count()));