from itertools import combinations s = input() print(len(combinations(s, len(s)))-1)