#よくある文字列の問題 def narabekae(t , s): if len(s) == 1: t += s if t not in slist: slist.append(t) return else: narabekae(t + s[0], s[1:]) narabekae(t + s[-1], s[:-1]) return S = input() slist = [] narabekae(S[0] , S[1:]) narabekae(S[-1] , S[:-1]) print(len(slist))