import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines S = read().rstrip().decode() def F(S): if not S: yield '' return for T in F(S[1:]): yield S[0] + T for T in F(S[:-1]): yield S[-1] + T answer = len(set(F(S))) print(answer)