def dfs(leng, n, s, s2, d): if leng == n: d.add(s2) return dfs(leng + 1, n, s[1:], s2 + s[0], d) dfs(leng + 1, n, s[:-1], s2 + s[-1], d) s = input() n = len(s) d = set() dfs(0, n, s, '', d) # print(d) ans = len(d) print(ans)