f = lambda K, S:f(K[1:], S + K[0]) + f(K[:-1], S + K[-1]) if len(K) else [S] print(len(set(f(input(), ""))))