S = raw_input() pat = set() def solve(s, ss): global pat if s == "": pat.add(ss) return solve(s[1:], ss + s[0]) solve(s[:-1], ss + s[-1]) solve(S, "") print len(pat)