from itertools import combinations a = list(input()) print(len(list(combinations(a, len(a)))))