S = input() n = len(S) d = {} def solve(S,T): if len(T) == n: d[T] = 1 return tmp1 = T+S[0] tmp2 = T+S[-1] solve(S[1:],tmp1) solve(S[:len(S)-1],tmp2) solve(S,"") print(len(d.keys()))