# http://chiwawa-star.hatenablog.com/entry/2017/07/12/194636 import sys input = sys.stdin.readline sys.setrecursionlimit(10**6) ############################## S = input().rstrip() ptn = set() def bfs(s, t): # print(s, t) if len(s) == 0: ptn.add(t) return bfs(s[1:], t+s[0]) bfs(s[0:-1], t+s[-1]) return bfs(S, '') print(len(ptn))