s = str(input()) memo = set() def dfs(s, t): if not s: memo.add(t) return dfs(s[1:], t+s[0]) dfs(s[:-1], t+s[-1]) dfs(s, '') print(len(memo))