def func(s): if len(s) == 1: return {s} else: t = func(s[1:]) u = { s[0] + x for x in t } v = func(s[:-1]) w = { s[-1] + x for x in v } return u.union(w) s = raw_input() print len(func(s))